Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 23, 2010, 11:54:16 PM (14 years ago)
Author:
dafrick
Message:

Cleanup in Script. Some more documenting in Notifications module.

Location:
code/trunk/src/modules/notifications
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/notifications/Notification.h

    r7484 r7486  
    4040#include <string>
    4141#include "core/BaseObject.h"
    42 #include "network/synchronisable/Synchronisable.h"
    4342
    4443namespace orxonox
  • code/trunk/src/modules/notifications/NotificationManager.cc

    r7484 r7486  
    116116    @param sender
    117117        The sender that sent the notification.
    118     */
    119     /*static*/ void NotificationManager::sendNotification(const std::string& message, unsigned int clientId, const std::string& sender)
     118    @param isLocal
     119        If this is set to true (false is default), then the Notification is sent to the client where this function is executed, meaning the Notification is sent locally.
     120    */
     121    /*static*/ void NotificationManager::sendNotification(const std::string& message, unsigned int clientId, const std::string& sender, bool isLocal)
    120122    {
    121123        // If we're in standalone mode or we're already no the right client we create and send the Notification.
    122         if(GameMode::isStandalone() || Host::getPlayerID() == clientId)
     124        if(GameMode::isStandalone() || isLocal || Host::getPlayerID() == clientId)
    123125        {
    124126            Notification* notification = new Notification(message);
  • code/trunk/src/modules/notifications/NotificationManager.h

    r7484 r7486  
    7676
    7777            //! Sends a Notification with the specified message to the specified client from the specified sender.
    78             static void sendNotification(const std::string& message, unsigned int clientId, const std::string& sender = NotificationManager::NONE);
     78            static void sendNotification(const std::string& message, unsigned int clientId, const std::string& sender = NotificationManager::NONE, bool isLocal = false);
    7979
    8080            bool registerNotification(Notification* notification); //!< Registers a Notification within the NotificationManager.
  • code/trunk/src/modules/notifications/NotificationQueue.h

    r7484 r7486  
    5858    };
    5959
    60     //! Struct to allow ordering of NotificationContainers.
     60    //! Struct to allow ordering of @ref orxonox::NotificationContainer "NotificationContainers".
    6161    struct NotificationContainerCompare {
    6262        bool operator() (const NotificationContainer* const & a, const NotificationContainer* const & b) const
     
    7373        - 'size': The size of the NotificationQueue, it specifies how many @ref orxonox::Notification "Notifications" are displayed at once at the most.
    7474        - 'displayTime': The time a @ref orxonox::Notification "Notification" is displayed with this NotificationQueue.
     75
    7576    @author
    7677        Damian 'Mozork' Frick
Note: See TracChangeset for help on using the changeset viewer.