[Orxonox-commit 1021] r5742 - code/trunk/src/libraries/network/synchronisable

scheusso at orxonox.net scheusso at orxonox.net
Sun Sep 6 17:03:31 CEST 2009


Author: scheusso
Date: 2009-09-06 17:03:30 +0200 (Sun, 06 Sep 2009)
New Revision: 5742

Modified:
   code/trunk/src/libraries/network/synchronisable/Synchronisable.cc
Log:
fixed a small bug which caused object id inconsistency on clients


Modified: code/trunk/src/libraries/network/synchronisable/Synchronisable.cc
===================================================================
--- code/trunk/src/libraries/network/synchronisable/Synchronisable.cc	2009-09-03 19:06:37 UTC (rev 5741)
+++ code/trunk/src/libraries/network/synchronisable/Synchronisable.cc	2009-09-06 15:03:30 UTC (rev 5742)
@@ -32,6 +32,7 @@
 
 #include <cstdlib>
 #include "core/CoreIncludes.h"
+#include "core/GameMode.h"
 #include "core/BaseObject.h"
 #include "network/Host.h"
 
@@ -51,7 +52,7 @@
     RegisterRootObject(Synchronisable);
     static uint32_t idCounter=0;
     objectMode_=0x1; // by default do not send data to server
-    if ( !Host::running() || ( Host::running() && Host::isServer() ) )
+    if ( GameMode::isMaster() || ( Host::running() && Host::isServer() ) )
     {
       this->objectID = idCounter++; //this is only needed when running a server
     //add synchronisable to the objectMap




More information about the Orxonox-commit mailing list