Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2006:
[Freeciv-Dev] (PR#15135) surrender causes duplicate game-over
Home

[Freeciv-Dev] (PR#15135) surrender causes duplicate game-over

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#15135) surrender causes duplicate game-over
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 10 Jan 2006 17:15:09 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=15135 >

If you do /surrender:

* check_for_game_over is called, and passes.  This forces the end of 
sniff, and has several side effects (gamelog and notify_conn).
* sniff_packets ends and check_for_game_over is called again.  Same result.

The end result is everything is done twice.  Bad.

Not sure how best to fix this.  The safest way is to remove 
check_for_game_over from the surrender function.  But this would mean 
surrendering doesn't take effect until the end of the turn.  Harder 
would be to remove the side effects from check_for_game_over.  Or we 
could set GAME_OVER_STATE inside that function, but that risks more side 
effects if changing GAME_OVER_STATE makes other code paths behave 
differently.

-jason





[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#15135) surrender causes duplicate game-over, Jason Short <=