summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rail_cmd.c2
-rw-r--r--road_cmd.c2
-rw-r--r--station_cmd.c2
-rw-r--r--tunnelbridge_cmd.c2
-rw-r--r--unmovable_cmd.c2
-rw-r--r--water_cmd.c2
6 files changed, 6 insertions, 6 deletions
diff --git a/rail_cmd.c b/rail_cmd.c
index c4c1d86d7..fec972c90 100644
--- a/rail_cmd.c
+++ b/rail_cmd.c
@@ -2167,7 +2167,7 @@ static void ChangeTileOwner_Track(TileIndex tile, PlayerID old_player, PlayerID
{
if (!IsTileOwner(tile, old_player)) return;
- if (new_player != 255) {
+ if (new_player != OWNER_SPECTATOR) {
SetTileOwner(tile, new_player);
} else {
DoCommandByTile(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
diff --git a/road_cmd.c b/road_cmd.c
index 8c0dd5a5c..eea3d00b4 100644
--- a/road_cmd.c
+++ b/road_cmd.c
@@ -1196,7 +1196,7 @@ static void ChangeTileOwner_Road(TileIndex tile, PlayerID old_player, PlayerID n
if (!IsTileOwner(tile, old_player)) return;
- if (new_player != 255) {
+ if (new_player != OWNER_SPECTATOR) {
SetTileOwner(tile, new_player);
} else {
if (GB(_m[tile].m5, 4, 4) == 0) {
diff --git a/station_cmd.c b/station_cmd.c
index e5e51d459..266505338 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -2952,7 +2952,7 @@ static void ChangeTileOwner_Station(TileIndex tile, PlayerID old_player, PlayerI
{
if (!IsTileOwner(tile, old_player)) return;
- if (new_player != 255) {
+ if (new_player != OWNER_SPECTATOR) {
Station *st = GetStation(_m[tile].m2);
SetTileOwner(tile, new_player);
st->owner = new_player;
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c
index ef59e06db..d51ffe6f3 100644
--- a/tunnelbridge_cmd.c
+++ b/tunnelbridge_cmd.c
@@ -1412,7 +1412,7 @@ static void ChangeTileOwner_TunnelBridge(TileIndex tile, PlayerID old_player, Pl
{
if (!IsTileOwner(tile, old_player)) return;
- if (new_player != 255) {
+ if (new_player != OWNER_SPECTATOR) {
SetTileOwner(tile, new_player);
} else {
if((_m[tile].m5 & 0xC0)==0xC0) {
diff --git a/unmovable_cmd.c b/unmovable_cmd.c
index 2a5abe3ca..e78d07baa 100644
--- a/unmovable_cmd.c
+++ b/unmovable_cmd.c
@@ -389,7 +389,7 @@ static void ChangeTileOwner_Unmovable(TileIndex tile, PlayerID old_player, Playe
{
if (!IsTileOwner(tile, old_player)) return;
- if (_m[tile].m5==3 && new_player != 255) {
+ if (_m[tile].m5 == 3 && new_player != OWNER_SPECTATOR) {
SetTileOwner(tile, new_player);
} else {
DoClearSquare(tile);
diff --git a/water_cmd.c b/water_cmd.c
index a2d33b66b..8b00cdab9 100644
--- a/water_cmd.c
+++ b/water_cmd.c
@@ -697,7 +697,7 @@ static void ChangeTileOwner_Water(TileIndex tile, PlayerID old_player, PlayerID
{
if (!IsTileOwner(tile, old_player)) return;
- if (new_player != 255) {
+ if (new_player != OWNER_SPECTATOR) {
SetTileOwner(tile, new_player);
} else {
DoCommandByTile(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);