Complete.Org: Mailing Lists: Archives: freeciv-dev: April 1999:
[Freeciv-Dev] [Q] How restart game
Home

[Freeciv-Dev] [Q] How restart game

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] [Q] How restart game
From: Andrey Kotrekhov <kota@xxxxxxxxx>
Date: Mon, 12 Apr 1999 16:37:13 +0300

Hello, all!
I have some questions:

1) After game is over, server don't permit put "s" command.
After game server state is GAME_OVER_STATE.
I see in source code (civserver.c) server can't restart game.
Am I right?

2) Game continue run after all human players get confuse.
ai players play between themselves 8-)
Why?
I attach diff result.
After this changes server go in GAME_OVER_STATE 
after all human players get confuse.

Best regards
--- ./civserver.c       Sun Mar 14 04:27:46 1999
+++ ../../freeciv-1.8.0/server/civserver.c      Sat Apr 10 21:50:38 1999

@@ -487,10 +492,11 @@
   if (game.nplayers == 1)
     return 0;
   for (i=0;i<game.nplayers; i++) {
-    if (game.players[i].is_alive)
+    /* kota@xxxxxxxxx считаем только тех, за которых играют люди */
+    if (game.players[i].is_alive && !game.players[i].ai.control)
       alive ++;
   }
-  return (alive <= 1);
+  return (alive < 1); /* kota@xxxxxxxxx замена с <= на < */
 }
 
 /**************************************************************************

[Prev in Thread] Current Thread [Next in Thread]