netpanzer-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netPanzer-CVS] netpanzer ./ChangeLog ./TODO src/NetPanzer/Clas...


From: Ivo Danihelka
Subject: [netPanzer-CVS] netpanzer ./ChangeLog ./TODO src/NetPanzer/Clas...
Date: Thu, 23 Oct 2003 15:26:15 -0400

CVSROOT:        /cvsroot/netpanzer
Module name:    netpanzer
Branch:         
Changes by:     Ivo Danihelka <address@hidden>  03/10/23 15:26:14

Modified files:
        .              : ChangeLog TODO 
        src/NetPanzer/Classes: SpawnList.cpp 

Log message:
        implemented respawntype=Random parameter

Patches:
Index: netpanzer/ChangeLog
diff -u netpanzer/ChangeLog:1.17 netpanzer/ChangeLog:1.18
--- netpanzer/ChangeLog:1.17    Wed Oct 22 19:05:39 2003
+++ netpanzer/ChangeLog Thu Oct 23 15:26:14 2003
@@ -1,3 +1,6 @@
+23-Oct-2003 by Ivo Danihelka
+-implemented respawntype="Random" parameter
+
 23-Oct-2003 by Matthias Braun
 -make dedicated server start automatic. Only the configuration file is read, no
  need interactively do settings anymore.
Index: netpanzer/TODO
diff -u netpanzer/TODO:1.7 netpanzer/TODO:1.8
--- netpanzer/TODO:1.7  Tue Oct 14 15:24:22 2003
+++ netpanzer/TODO      Thu Oct 23 15:26:14 2003
@@ -2,6 +2,7 @@
 -Convert the 256 color stuff to truecolor
 -Add timeout/keepalive handling to network layer to correctly detect connection
  losses and try reconnects
+-impelement 'initialunits' param in PlayerUnitConfig::initialize()
 
 *** Feature Additions
 
@@ -22,4 +23,5 @@
 -Create possibility to save and restore matches
 -Convert the 256 color stuff to truecolor
 -add code for masterserver registration/browsing
+
 
Index: netpanzer/src/NetPanzer/Classes/SpawnList.cpp
diff -u netpanzer/src/NetPanzer/Classes/SpawnList.cpp:1.7 
netpanzer/src/NetPanzer/Classes/SpawnList.cpp:1.8
--- netpanzer/src/NetPanzer/Classes/SpawnList.cpp:1.7   Wed Sep 24 13:43:21 2003
+++ netpanzer/src/NetPanzer/Classes/SpawnList.cpp       Thu Oct 23 15:26:14 2003
@@ -22,6 +22,7 @@
 #include "SpawnList.hpp"
 #include "FileSystem.hpp"
 #include "Exception.hpp"
+#include "GameConfig.hpp"
 
 SpawnList::SpawnList( unsigned long size )
 {
@@ -77,7 +78,16 @@
 {
     unsigned long spawn_index;
 
-    spawn_index = last_spawn_index;
+    switch(gameconfig->respawntype) {
+        case _game_config_respawn_type_round_robin :
+            spawn_index = last_spawn_index;
+            break;
+        case _game_config_respawn_type_random :
+            spawn_index = rand() % size;
+            break;
+        default:
+            assert("unknown respawn type" == 0);
+    }
 
     do {
         if ( array[ spawn_index ].spawn_delay.count() ) {
@@ -90,6 +100,5 @@
 
         spawn_index = (spawn_index + 1) % size;
 
-    } while( spawn_index != last_spawn_index );
-
+    } while(false);
 }




reply via email to

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