- change team # in end game stats for team switching

This commit is contained in:
Mark Vejvoda 2012-07-19 23:21:55 +00:00
parent fb2f643131
commit 1c52f28185
1 changed files with 2 additions and 0 deletions

View File

@ -661,6 +661,7 @@ void Commander::giveNetworkCommand(NetworkCommand* networkCommand) const {
faction->setTeam(newTeam);
GameSettings *settings = world->getGameSettingsPtr();
settings->setTeam(factionIndex,newTeam);
world->getStats()->setTeam(factionIndex, newTeam);
if(factionIndex == world->getThisFactionIndex()) {
world->setThisTeamIndex(newTeam);
@ -753,6 +754,7 @@ void Commander::giveNetworkCommand(NetworkCommand* networkCommand) const {
faction->setTeam(vote->newTeam);
GameSettings *settings = world->getGameSettingsPtr();
settings->setTeam(factionIndex,vote->newTeam);
world->getStats()->setTeam(factionIndex, vote->newTeam);
if(factionIndex == world->getThisFactionIndex()) {
world->setThisTeamIndex(vote->newTeam);