|
@@ -192,13 +192,13 @@ int32 CmdRemoveRoad(int x, int y, uint32
|
|
|
|
|
|
cost = _price.remove_road * 2;
|
|
|
|
|
|
if (flags & DC_EXEC) {
|
|
|
ChangeTownRating(t, -road_remove_cost[(byte)edge_road], RATING_ROAD_MINIMUM);
|
|
|
_map5[tile] = ti.map5 & 0xC7;
|
|
|
_map_owner[tile] = OWNER_NONE;
|
|
|
SetTileOwner(tile, OWNER_NONE);
|
|
|
MarkTileDirtyByTile(tile);
|
|
|
}
|
|
|
return cost;
|
|
|
} else if (ti.type == MP_STREET) {
|
|
|
// check if you're allowed to remove the street owned by a town
|
|
|
// removal allowance depends on difficulty setting
|
|
@@ -467,13 +467,13 @@ do_clear:;
|
|
|
|
|
|
if (flags & DC_EXEC) {
|
|
|
if (ti.type != MP_STREET) {
|
|
|
SetTileType(tile, MP_STREET);
|
|
|
_map5[tile] = 0;
|
|
|
_map2[tile] = p2;
|
|
|
_map_owner[tile] = _current_player;
|
|
|
SetTileOwner(tile, _current_player);
|
|
|
}
|
|
|
|
|
|
_map5[tile] |= (byte)pieces;
|
|
|
|
|
|
MarkTileDirtyByTile(tile);
|
|
|
}
|
|
@@ -1145,20 +1145,20 @@ static void ChangeTileOwner_Road(uint ti
|
|
|
_map3_lo[tile] = (new_player == 0xFF) ? OWNER_NONE : new_player;
|
|
|
}
|
|
|
|
|
|
if (!IsTileOwner(tile, old_player)) return;
|
|
|
|
|
|
if (new_player != 255) {
|
|
|
_map_owner[tile] = new_player;
|
|
|
SetTileOwner(tile, new_player);
|
|
|
} else {
|
|
|
b = _map5[tile]&0xF0;
|
|
|
if (b == 0) {
|
|
|
_map_owner[tile] = OWNER_NONE;
|
|
|
SetTileOwner(tile, OWNER_NONE);
|
|
|
} else if (b == 0x10) {
|
|
|
_map5[tile] = (_map5[tile]&8) ? 0x5 : 0xA;
|
|
|
_map_owner[tile] = _map3_lo[tile];
|
|
|
SetTileOwner(tile, _map3_lo[tile]);
|
|
|
_map3_lo[tile] = 0;
|
|
|
_map3_hi[tile] &= 0x80;
|
|
|
} else {
|
|
|
DoCommandByTile(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
|
|
|
}
|
|
|
}
|