Complete.Org: Mailing Lists: Archives: freeciv-dev: October 1998:
[Freeciv-Dev] saveturns=0 fix
Home

[Freeciv-Dev] saveturns=0 fix

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxxx
Subject: [Freeciv-Dev] saveturns=0 fix
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Sun, 25 Oct 1998 15:19:55 +1100

Ben Korvemaker pointed out that saveturns=0 should turn off auto-saving.
This patch should suffice.  

(Note: it keeps incrementing the coutner which I think is "correct"
so it counts from the previous auto-save if you reset saveturns later.)

-- David
diff -u -r --exclude-from exclude freeciv-cvs/server/civserver.c 
freeciv-mod/server/civserver.c
--- freeciv-cvs/server/civserver.c      Sun Oct 25 13:58:47 1998
+++ freeciv-mod/server/civserver.c      Sun Oct 25 14:09:23 1998
@@ -403,7 +403,7 @@
     for(i=0;i<game.nplayers;i++)
       connection_do_unbuffer(game.players[i].conn);
       
-    if(++save_counter>=game.save_nturns) {
+    if(++save_counter>=game.save_nturns && game.save_nturns>0) {
       save_counter=0;
       save_game();
     }

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] saveturns=0 fix, David Pfitzner <=