(svn r1716) Prevent zeppelins from accessing non-existent tiles when leaving the map

This commit is contained in:
tron 2005-01-29 14:53:05 +00:00
parent f08d102ac2
commit f2af1ed332

View File

@ -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])) {