mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-27 00:19:09 +00:00
(svn r6776) -Codechange: Use IsValidPlayer() function to determine of a PlayerID is an
actual playable player (< MAX_PLAYERS) or not.
This commit is contained in:
@@ -423,7 +423,7 @@ not_valid_below:;
|
||||
|
||||
bridge_len += 2; // begin and end tiles/ramps
|
||||
|
||||
if (_current_player < MAX_PLAYERS && !_is_old_ai_player)
|
||||
if (IsValidPlayer(_current_player) && !_is_old_ai_player)
|
||||
bridge_len = CalcBridgeLenCostFactor(bridge_len);
|
||||
|
||||
cost += (int64)bridge_len * _price.build_bridge * b->price >> 8;
|
||||
|
Reference in New Issue
Block a user