(svn r13731) -Codechange: make a pool of the array of players.

This commit is contained in:
rubidium
2008-07-18 16:40:29 +00:00
parent 56ad26a3aa
commit cde65455ac
38 changed files with 173 additions and 242 deletions

View File

@@ -1001,14 +1001,14 @@ static const OldChunks player_chunk[] = {
static bool LoadOldPlayer(LoadgameState *ls, int num)
{
Player *p = GetPlayer((PlayerID)num);
Player *p = new (num) Player();
_current_player_id = (PlayerID)num;
if (!LoadChunk(ls, p, player_chunk)) return false;
if (_old_string_id == 0) {
p->is_active = false;
delete p;
return true;
}