[Orxonox-commit 2757] r7462 - in code/trunk/src/modules: notifications questsystem

dafrick at orxonox.net dafrick at orxonox.net
Fri Sep 17 20:49:06 CEST 2010


Author: dafrick
Date: 2010-09-17 20:49:06 +0200 (Fri, 17 Sep 2010)
New Revision: 7462

Modified:
   code/trunk/src/modules/notifications/Notification.cc
   code/trunk/src/modules/questsystem/QuestListener.cc
Log:
Small changes in Notification to work towards synchronizing them...


Modified: code/trunk/src/modules/notifications/Notification.cc
===================================================================
--- code/trunk/src/modules/notifications/Notification.cc	2010-09-17 13:13:47 UTC (rev 7461)
+++ code/trunk/src/modules/notifications/Notification.cc	2010-09-17 18:49:06 UTC (rev 7462)
@@ -35,6 +35,7 @@
 
 #include "core/CoreIncludes.h"
 #include "network/NetworkFunction.h"
+#include "network/Host.h"
 #include "NotificationManager.h"
 
 namespace orxonox
@@ -42,7 +43,7 @@
 
     CreateUnloadableFactory(Notification);
 
-    registerMemberNetworkFunction(Notification, sendHelper);
+    registerMemberNetworkFunction(Notification, send);
 
     /**
     @brief
@@ -112,14 +113,13 @@
     */
     bool Notification::send(unsigned int clientId, const std::string & sender = NotificationManager::NONE)
     {
-
-        if(GameMode::isStandalone())
+        if(GameMode::isStandalone() || Host::getPlayerID() == clientId)
         {
             this->sendHelper(sender);
         }
-        else
+        else if(GameMode::isServer())
         {
-            callMemberNetworkFunction(Notification, sendHelper, this->getObjectID(), clientId, sender);
+            callMemberNetworkFunction(Notification, send, this->getObjectID(), clientId, clientId, sender);
         }
 
         return true;

Modified: code/trunk/src/modules/questsystem/QuestListener.cc
===================================================================
--- code/trunk/src/modules/questsystem/QuestListener.cc	2010-09-17 13:13:47 UTC (rev 7461)
+++ code/trunk/src/modules/questsystem/QuestListener.cc	2010-09-17 18:49:06 UTC (rev 7462)
@@ -43,7 +43,7 @@
 {
     CreateFactory(QuestListener);
 
-    //! Initialization of the static variables for the modes as strings.
+    // Initialization of the static variables for the modes as strings.
     /*static*/ const std::string QuestListener::ALL = "all";
     /*static*/ const std::string QuestListener::START = "start";
     /*static*/ const std::string QuestListener::FAIL = "fail";




More information about the Orxonox-commit mailing list