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/misc_cmd.cpp | |
parent | 891bec7e23a0a077df93b8fd1fe156ef059df8b4 (diff) | |
download | openttd-3a799389ebf915cc59b6e85346d837621ebe771a.tar.xz |
(svn r13731) -Codechange: make a pool of the array of players.
Diffstat (limited to 'src/misc_cmd.cpp')
-rw-r--r-- | src/misc_cmd.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/misc_cmd.cpp b/src/misc_cmd.cpp index c8408ee85..847200c49 100644 --- a/src/misc_cmd.cpp +++ b/src/misc_cmd.cpp @@ -69,7 +69,7 @@ CommandCost CmdSetPlayerColor(TileIndex tile, uint32 flags, uint32 p1, uint32 p2 if (scheme == LS_DEFAULT && state == 0) { const Player *pp; FOR_ALL_PLAYERS(pp) { - if (pp->is_active && pp != p && pp->player_color == colour) return CMD_ERROR; + if (pp != p && pp->player_color == colour) return CMD_ERROR; } } @@ -208,7 +208,6 @@ static bool IsUniqueCompanyName(const char *name) char buf[512]; FOR_ALL_PLAYERS(p) { - if (!p->is_active) continue; SetDParam(0, p->index); GetString(buf, STR_COMPANY_NAME, lastof(buf)); if (strcmp(buf, name) == 0) return false; @@ -245,7 +244,6 @@ static bool IsUniquePresidentName(const char *name) char buf[512]; FOR_ALL_PLAYERS(p) { - if (!p->is_active) continue; SetDParam(0, p->index); GetString(buf, STR_PLAYER_NAME, lastof(buf)); if (strcmp(buf, name) == 0) return false; |