- change team # in end game stats for team switching
This commit is contained in:
parent
fb2f643131
commit
1c52f28185
|
@ -661,6 +661,7 @@ void Commander::giveNetworkCommand(NetworkCommand* networkCommand) const {
|
||||||
faction->setTeam(newTeam);
|
faction->setTeam(newTeam);
|
||||||
GameSettings *settings = world->getGameSettingsPtr();
|
GameSettings *settings = world->getGameSettingsPtr();
|
||||||
settings->setTeam(factionIndex,newTeam);
|
settings->setTeam(factionIndex,newTeam);
|
||||||
|
world->getStats()->setTeam(factionIndex, newTeam);
|
||||||
|
|
||||||
if(factionIndex == world->getThisFactionIndex()) {
|
if(factionIndex == world->getThisFactionIndex()) {
|
||||||
world->setThisTeamIndex(newTeam);
|
world->setThisTeamIndex(newTeam);
|
||||||
|
@ -753,6 +754,7 @@ void Commander::giveNetworkCommand(NetworkCommand* networkCommand) const {
|
||||||
faction->setTeam(vote->newTeam);
|
faction->setTeam(vote->newTeam);
|
||||||
GameSettings *settings = world->getGameSettingsPtr();
|
GameSettings *settings = world->getGameSettingsPtr();
|
||||||
settings->setTeam(factionIndex,vote->newTeam);
|
settings->setTeam(factionIndex,vote->newTeam);
|
||||||
|
world->getStats()->setTeam(factionIndex, vote->newTeam);
|
||||||
|
|
||||||
if(factionIndex == world->getThisFactionIndex()) {
|
if(factionIndex == world->getThisFactionIndex()) {
|
||||||
world->setThisTeamIndex(vote->newTeam);
|
world->setThisTeamIndex(vote->newTeam);
|
||||||
|
|
Loading…
Reference in New Issue