Closed calmackenzie closed 5 years ago
`
networking::ClientGame* client = networking::ClientGame::getInstance();
if (clientId == client->getClientId())
{
eventData->putInt(GAME_END_RESULT, HOST_COMMANDER_DIED);
}
else
{
eventData->putInt(GAME_END_RESULT, CLIENT_COMMANDER_DIED);
}`
These lines in GameModeManager check the which one wins. I think this where the problem is.
clientId is the id for winner.
@kamarapala. I assumed HOST_COMMANDER_DIED means victory and CLIENT_COMMANDER_DIED means defeated. Was I wrong?
I think I set it up a bit weird since when I implemented the original Commander death victory condition, it checked the ID of the Commander that died to this client's ID. So it was checking the ID of the losing player.
With the new game mode conditions, it's checking this client's ID against the ID of the winning player. That's why they are reversed.
The macro names should also probably be changed at this point since they aren't accurate to what's actually happening
HOST_COMMANDER_DIED
-> DEFEAT
, or something like thatCLIENT_COMMANDER_DIED
-> VICTORY
, or something like thatOK, I will change Host die to DEFEAT and client die to VICTORY
Host (yellow) lost even though he was the one gaining points