Codechange: Use SQInteger for generic numbers in script_map

This commit is contained in:
glx22
2023-03-04 15:51:14 +01:00
committed by Loïc Guilloux
parent a225fda9fe
commit ca67075397
3 changed files with 26 additions and 25 deletions

View File

@@ -276,11 +276,11 @@
if (tile - from == 1) {
if (to - tile == 1) return (GetRailTracks(tile) & RAILTRACK_NE_SW) != 0;
if (to - tile == ScriptMap::GetMapSizeX()) return (GetRailTracks(tile) & RAILTRACK_NE_SE) != 0;
} else if (tile - from == ScriptMap::GetMapSizeX()) {
if (to - tile == (int)ScriptMap::GetMapSizeX()) return (GetRailTracks(tile) & RAILTRACK_NE_SE) != 0;
} else if (tile - from == (int)ScriptMap::GetMapSizeX()) {
if (tile - to == 1) return (GetRailTracks(tile) & RAILTRACK_NW_NE) != 0;
if (to - tile == 1) return (GetRailTracks(tile) & RAILTRACK_NW_SW) != 0;
if (to - tile == ScriptMap::GetMapSizeX()) return (GetRailTracks(tile) & RAILTRACK_NW_SE) != 0;
if (to - tile == (int)ScriptMap::GetMapSizeX()) return (GetRailTracks(tile) & RAILTRACK_NW_SE) != 0;
} else {
return (GetRailTracks(tile) & RAILTRACK_SW_SE) != 0;
}