Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 2, 2010, 12:08:16 PM (14 years ago)
Author:
dafrick
Message:

Some additional changes.

Location:
code/branches/notifications/src/modules/notifications
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/notifications/src/modules/notifications/CMakeLists.txt

    r7324 r7326  
    1616    NotificationsPrecompiledHeaders.h
    1717  LINK_LIBRARIES
    18     objects
    1918    orxonox
    2019    overlays
  • code/branches/notifications/src/modules/notifications/Notification.cc

    r7324 r7326  
    4343    CreateUnloadableFactory(Notification);
    4444
    45     registerMemberNetworkFunction(Notification, send);
     45    registerMemberNetworkFunction(Notification, sendHelper);
    4646
    4747    /**
     
    107107    bool Notification::send(unsigned int clientId, const std::string & sender = NotificationManager::NONE)
    108108    {
    109         if(GameMode::isMaster())
    110         {
    111             if(this->isSent()) //TODO: Needed?
    112                 return false;
    113109
    114             this->sender_ = sender;
    115             bool successful = NotificationManager::getInstance().registerNotification(this);
    116             if(!successful)
    117                 return false;
    118             this->sent_ = true;
     110        callMemberNetworkFunction(Notification, sendHelper, this->getObjectID(), clientId, clientId, sender);
    119111
    120             COUT(3) << "Notification \"" << this->getMessage() << "\" sent." << std::endl;
    121         }
    122         else
    123         {
    124             callMemberNetworkFunction(Notification, send, this->getObjectID(), clientId, clientId, sender);
    125         }
     112        return true;
     113    }
     114
     115    bool Notification::sendHelper(unsigned int clientId, const std::string& sender)
     116    {
     117        if(this->isSent()) //TODO: Needed?
     118            return false;
     119
     120        this->sender_ = sender;
     121        bool successful = NotificationManager::getInstance().registerNotification(this);
     122        if(!successful)
     123            return false;
     124        this->sent_ = true;
     125
     126        COUT(3) << "Notification \"" << this->getMessage() << "\" sent." << std::endl;
    126127
    127128        return true;
  • code/branches/notifications/src/modules/notifications/Notification.h

    r7324 r7326  
    5858
    5959            bool send(unsigned int clientId, const std::string & sender); //!< Sends the Notification to the Notificationmanager.
     60            bool sendHelper(unsigned int clientId, const std::string& sender);
    6061
    6162            /**
Note: See TracChangeset for help on using the changeset viewer.