- Timestamp:
- Sep 21, 2010, 11:15:44 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/notifications/NotificationManager.cc
r7417 r7474 38 38 #include "core/GUIManager.h" 39 39 #include "core/LuaState.h" 40 #include "network/Host.h" 41 #include "network/NetworkFunction.h" 40 42 #include "util/ScopedSingletonManager.h" 41 43 … … 59 61 60 62 SetConsoleCommand("enterEditMode", &NotificationManager::enterEditMode); 63 64 registerStaticNetworkFunction(NotificationManager::sendNotification); 61 65 62 66 /** … … 100 104 } 101 105 this->queues_.clear(); 106 } 107 108 /*static*/ void NotificationManager::sendNotification(const std::string& message, unsigned int clientId, const std::string& sender) 109 { 110 if(GameMode::isStandalone() || Host::getPlayerID() == clientId) 111 { 112 Notification* notification = new Notification(message); 113 notification->send(sender); 114 } 115 else if(GameMode::isServer()) 116 { 117 callStaticNetworkFunction(NotificationManager::sendNotification, clientId, message, clientId, sender); 118 } 102 119 } 103 120
Note: See TracChangeset
for help on using the changeset viewer.