// $Id: HandleOsGameOver.htm 119 2004-05-16 00:02:24Z ggs_mburo $ // This is a GGS file, licensed under the GPL HandleOsGameOver

HandleOsGameOver

ggsstream::HandleOsGameOver(const CMsgOsMatchDelta* pmsg, const string& idg)

This is a dummy message, sent by BaseOsMatchDelta() when a game ends. Game over messages are sent even if the match terminates abnormally (e.g. one player leaves). They are sent only if the game data idToGame[idg] exists (if you were playing in or watching the game).

Normal Response

Override this function in CODKStream:

BaseOsGameOver() deletes the games from the games list. Therefore call BaseOsGameOver() after you have done any game-specific processing.

Sample Code

LearnGame is a user-defined function:

void CODKStream::HandleOsGameOver(const CMsgOsMatchDelta* pmsg,const string& idg) { if (pmsg->match.IsPlaying(GetLogin())) LearnGame(idToGame[idg]); BaseOsGameOver(pmsg, idg); }