mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r10012) -Fix (r9999): crash when forcing road vehicles to turn
This commit is contained in:
parent
0d0a8661de
commit
9f60f2ecbb
@ -485,7 +485,7 @@ int32 CmdTurnRoadVeh(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||
return CMD_ERROR;
|
||||
}
|
||||
|
||||
if (GetDisallowedRoadDirections(v->tile) != DRD_NONE) return CMD_ERROR;
|
||||
if (IsTileType(v->tile, MP_STREET) && GetRoadTileType(v->tile) == ROAD_TILE_NORMAL && GetDisallowedRoadDirections(v->tile) != DRD_NONE) return CMD_ERROR;
|
||||
|
||||
if (IsTunnelTile(v->tile) && DirToDiagDir(v->direction) == GetTunnelDirection(v->tile)) return CMD_ERROR;
|
||||
if (IsBridgeTile(v->tile) && DirToDiagDir(v->direction) == GetBridgeRampDirection(v->tile)) return CMD_ERROR;
|
||||
@ -1417,7 +1417,7 @@ again:
|
||||
v->cur_speed = 0;
|
||||
return;
|
||||
}
|
||||
} else if (IsTileType(tile, MP_STREET) && GetRoadTileType(v->tile) == ROAD_TILE_NORMAL && GetDisallowedRoadDirections(v->tile) != DRD_NONE) {
|
||||
} else if (IsTileType(v->tile, MP_STREET) && GetRoadTileType(v->tile) == ROAD_TILE_NORMAL && GetDisallowedRoadDirections(v->tile) != DRD_NONE) {
|
||||
v->cur_speed = 0;
|
||||
return;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user