Changeset - r9890:c31f485e55d9
[Not reviewed]
master
0 2 0
rubidium - 16 years ago 2008-08-10 19:00:33
rubidium@openttd.org
(svn r14038) -Fix [FS#2211] (r13731): company limit was not properly enforced for CMD_PLAYER_CTRL.
2 files changed with 7 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/player_base.h
Show inline comments
 
@@ -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);
src/players.cpp
Show inline comments
 
@@ -516,9 +516,9 @@ void ResetPlayerLivery(Player *p)
 
 */
 
Player *DoStartupNewPlayer(bool is_ai)
 
{
 
	Player *p = new Player(STR_SV_UNNAMED, is_ai);
 
	if (!Player::CanAllocateItem()) return NULL;
 

	
 
	if (p == NULL) return NULL;
 
	Player *p = new Player(STR_SV_UNNAMED, is_ai);
 

	
 
	memset(&_players_ai[p->index], 0, sizeof(PlayerAI));
 
	memset(&_players_ainew[p->index], 0, sizeof(PlayerAiNew));
0 comments (0 inline, 0 general)