mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r1716) Prevent zeppelins from accessing non-existent tiles when leaving the map
This commit is contained in:
parent
f08d102ac2
commit
f2af1ed332
@ -171,7 +171,8 @@ static void DisasterTick_Zeppeliner(Vehicle *v)
|
|||||||
} else if (v->current_order.station == 0) {
|
} else if (v->current_order.station == 0) {
|
||||||
tile = v->tile; /**/
|
tile = v->tile; /**/
|
||||||
|
|
||||||
if (IsTileType(tile, MP_STATION) &&
|
if (IsValidTile(tile) &&
|
||||||
|
IsTileType(tile, MP_STATION) &&
|
||||||
IS_BYTE_INSIDE(_map5[tile], 8, 0x43) &&
|
IS_BYTE_INSIDE(_map5[tile], 8, 0x43) &&
|
||||||
IS_HUMAN_PLAYER(_map_owner[tile])) {
|
IS_HUMAN_PLAYER(_map_owner[tile])) {
|
||||||
|
|
||||||
@ -196,7 +197,8 @@ static void DisasterTick_Zeppeliner(Vehicle *v)
|
|||||||
|
|
||||||
tile = v->tile; /**/
|
tile = v->tile; /**/
|
||||||
|
|
||||||
if (IsTileType(tile, MP_STATION) &&
|
if (IsValidTile(tile) &&
|
||||||
|
IsTileType(tile, MP_STATION) &&
|
||||||
IS_BYTE_INSIDE(_map5[tile], 8, 0x43) &&
|
IS_BYTE_INSIDE(_map5[tile], 8, 0x43) &&
|
||||||
IS_HUMAN_PLAYER(_map_owner[tile])) {
|
IS_HUMAN_PLAYER(_map_owner[tile])) {
|
||||||
|
|
||||||
@ -238,7 +240,8 @@ static void DisasterTick_Zeppeliner(Vehicle *v)
|
|||||||
}
|
}
|
||||||
|
|
||||||
tile = v->tile;/**/
|
tile = v->tile;/**/
|
||||||
if (IsTileType(tile, MP_STATION) &&
|
if (IsValidTile(tile) &&
|
||||||
|
IsTileType(tile, MP_STATION) &&
|
||||||
IS_BYTE_INSIDE(_map5[tile], 8, 0x43) &&
|
IS_BYTE_INSIDE(_map5[tile], 8, 0x43) &&
|
||||||
IS_HUMAN_PLAYER(_map_owner[tile])) {
|
IS_HUMAN_PLAYER(_map_owner[tile])) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user