(svn r11312) -Codechange: implement a overflow safe integer and use that for money and don't misuses CommandCost to have a overflow safe integer. Based on a patch by Noldo.
This commit is contained in:
@@ -366,7 +366,7 @@ static CommandCost CheckRoadSlope(Slope tileh, RoadBits* pieces, RoadBits existi
|
||||
|
||||
/* foundation is used. Whole tile is leveled up */
|
||||
if ((~_valid_tileh_slopes_road[1][tileh] & road_bits) == ROAD_NONE) {
|
||||
return CommandCost(existing != ROAD_NONE ? 0 : _price.terraform);
|
||||
return CommandCost(existing != ROAD_NONE ? (Money)0 : _price.terraform);
|
||||
}
|
||||
|
||||
/* Force straight roads. */
|
||||
|
Reference in New Issue
Block a user