(svn r1716) Prevent zeppelins from accessing non-existent tiles when leaving the map
authortron
Sat, 29 Jan 2005 14:53:05 +0000
changeset 1212 e9fbf66a8af2
parent 1211 6f2f723e5c36
child 1213 bb9906f67932
(svn r1716) Prevent zeppelins from accessing non-existent tiles when leaving the map
disaster_cmd.c
--- a/disaster_cmd.c	Sat Jan 29 13:33:48 2005 +0000
+++ b/disaster_cmd.c	Sat Jan 29 14:53:05 2005 +0000
@@ -171,7 +171,8 @@
 		} else if (v->current_order.station == 0) {
 			tile = v->tile; /**/
 
-			if (IsTileType(tile, MP_STATION) &&
+			if (IsValidTile(tile) &&
+					IsTileType(tile, MP_STATION) &&
 				IS_BYTE_INSIDE(_map5[tile], 8, 0x43) &&
 				IS_HUMAN_PLAYER(_map_owner[tile])) {
 
@@ -196,7 +197,8 @@
 
 		tile = v->tile; /**/
 
-		if (IsTileType(tile, MP_STATION) &&
+		if (IsValidTile(tile) &&
+				IsTileType(tile, MP_STATION) &&
 			IS_BYTE_INSIDE(_map5[tile], 8, 0x43) &&
 			IS_HUMAN_PLAYER(_map_owner[tile])) {
 
@@ -238,7 +240,8 @@
 	}
 
 	tile = v->tile;/**/
-	if (IsTileType(tile, MP_STATION) &&
+	if (IsValidTile(tile) &&
+			IsTileType(tile, MP_STATION) &&
 		IS_BYTE_INSIDE(_map5[tile], 8, 0x43) &&
 		IS_HUMAN_PLAYER(_map_owner[tile])) {