1
0
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:
Darkvater
2006-10-14 22:31:18 +00:00
parent 9732c129c1
commit 6b6d908308
15 changed files with 50 additions and 49 deletions

View File

@@ -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;