1
0
Fork 0

(svn r3036) Use IsCompatibleRail() to check the rail type of level crossings (not a fix, because the old == method works so far)

release/0.4.5
tron 2005-10-13 14:44:03 +00:00
parent 03e947cbfe
commit d37639ac3e
1 changed files with 4 additions and 2 deletions

View File

@ -2465,8 +2465,10 @@ static bool CheckCompatibleRail(const Vehicle *v, TileIndex tile)
case MP_STREET: case MP_STREET:
// tracks over roads, do owner check of tracks // tracks over roads, do owner check of tracks
return return
IsTileOwner(tile, v->owner) && IsTileOwner(tile, v->owner) && (
(v->subtype != TS_Front_Engine || GB(_m[tile].m4, 0, 4) == v->u.rail.railtype); v->subtype != TS_Front_Engine ||
IsCompatibleRail(v->u.rail.railtype, GB(_m[tile].m4, 0, 4))
);
default: default:
return true; return true;