(svn r2961) - Fix: [ 1219123 ] Fix for [ 1216203 ] UFO-broken waypoint (lucaspiller)
authorDarkvater
Sat, 17 Sep 2005 13:57:01 +0000
changeset 2435 9b9d43988058
parent 2434 1134a371ebdd
child 2436 7d5df545bd5d
(svn r2961) - Fix: [ 1219123 ] Fix for [ 1216203 ] UFO-broken waypoint (lucaspiller)
disaster_cmd.c
--- a/disaster_cmd.c	Sat Sep 17 13:15:16 2005 +0000
+++ b/disaster_cmd.c	Sat Sep 17 13:57:01 2005 +0000
@@ -10,6 +10,7 @@
 #include "command.h"
 #include "news.h"
 #include "station.h"
+#include "waypoint.h"
 #include "town.h"
 #include "industry.h"
 #include "player.h"
@@ -24,11 +25,11 @@
 
 	switch (GetTileType(tile)) {
 		case MP_RAILWAY:
-			if (IS_HUMAN_PLAYER(GetTileOwner(tile))) DoClearSquare(tile);
+			if (IS_HUMAN_PLAYER(GetTileOwner(tile)) && !IsRailWaypoint(_m[tile].m5)) DoClearSquare(tile);
 			break;
 
 		case MP_HOUSE: {
-			byte p = _current_player;
+			PlayerID p = _current_player;
 			_current_player = OWNER_NONE;
 			DoCommandByTile(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
 			_current_player = p;