diff options
author | rubidium <rubidium@openttd.org> | 2008-07-18 16:40:29 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-07-18 16:40:29 +0000 |
commit | 3a799389ebf915cc59b6e85346d837621ebe771a (patch) | |
tree | 82319a3d42401c6d6fa4944e99863807f05c6f5f /src/cheat_gui.cpp | |
parent | 891bec7e23a0a077df93b8fd1fe156ef059df8b4 (diff) | |
download | openttd-3a799389ebf915cc59b6e85346d837621ebe771a.tar.xz |
(svn r13731) -Codechange: make a pool of the array of players.
Diffstat (limited to 'src/cheat_gui.cpp')
-rw-r--r-- | src/cheat_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cheat_gui.cpp b/src/cheat_gui.cpp index 1d4ca80cb..482f4bc41 100644 --- a/src/cheat_gui.cpp +++ b/src/cheat_gui.cpp @@ -44,8 +44,8 @@ static int32 ClickMoneyCheat(int32 p1, int32 p2) */ static int32 ClickChangePlayerCheat(int32 p1, int32 p2) { - while (IsValidPlayerID((PlayerID)p1)) { - if (_players[p1].is_active) { + while ((uint)p1 < GetPlayerPoolSize()) { + if (IsValidPlayerID((PlayerID)p1)) { SetLocalPlayer((PlayerID)p1); MarkWholeScreenDirty(); |