diff options
author | rubidium <rubidium@openttd.org> | 2008-08-10 19:00:33 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-08-10 19:00:33 +0000 |
commit | b3a15a398394cfb0f43bfa4dad971fb77457ff94 (patch) | |
tree | ad0db2d5397b9ddf228f397b54d835dba0d3d97d /src/player_base.h | |
parent | 110a9f8fc05abfc09cd56730dafea62c9d739f98 (diff) | |
download | openttd-b3a15a398394cfb0f43bfa4dad971fb77457ff94.tar.xz |
(svn r14038) -Fix [FS#2211] (r13731): company limit was not properly enforced for CMD_PLAYER_CTRL.
Diffstat (limited to 'src/player_base.h')
-rw-r--r-- | src/player_base.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/player_base.h b/src/player_base.h index e8c77344d..6f11e54e3 100644 --- a/src/player_base.h +++ b/src/player_base.h @@ -24,7 +24,11 @@ struct PlayerEconomyEntry { Money company_value; }; -DECLARE_OLD_POOL(Player, Player, 1, MAX_PLAYERS) +/* The third parameter and the number after >> MUST be the same, + * otherwise more (or less) players will be allowed to be + * created than what MAX_PLAYER specifies! + */ +DECLARE_OLD_POOL(Player, Player, 1, MAX_PLAYERS >> 1) struct Player : PoolItem<Player, PlayerByte, &_Player_pool> { Player(uint16 name_1 = 0, bool is_ai = false); |