Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7127 for code/branches


Ignore:
Timestamp:
Jun 9, 2010, 9:32:58 PM (14 years ago)
Author:
rgrieder
Message:

Removed excess white space at the end of lines.

Location:
code/branches/presentation3/src
Files:
104 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3/src/libraries/core/BaseObject.cc

    r7105 r7127  
    105105        }
    106106    }
    107    
     107
    108108    /** @brief Adds an object which listens to the events of this object. */
    109109    void BaseObject::registerEventListener(BaseObject* object)
     
    125125        XMLPortParam(BaseObject, "mainstate", setMainStateName, getMainStateName, xmlelement, mode);
    126126        XMLPortParamTemplate(BaseObject, "template", addTemplate, getSingleTemplate, xmlelement, mode, const std::string&);
    127        
     127
    128128        XMLPortObjectTemplate(BaseObject, Template, "templates", addTemplate, getTemplate, xmlelement, mode, Template*);
    129129        XMLPortObject(BaseObject, BaseObject, "eventlisteners", addEventListener, getEventListener, xmlelement, mode);
     
    372372    {
    373373        this->registerEventStates();
    374        
     374
    375375        COUT(4) << this->getIdentifier()->getName() << " (&" << this << ") processing event. originator: " << event.originator_->getIdentifier()->getName() << " (&" << event.originator_ << "), activate: " << event.activate_ << ", name: " << event.name_ << ", statename: " << event.statename_ << "." << std::endl;
    376376
  • code/branches/presentation3/src/libraries/core/BaseObject.h

    r7105 r7127  
    154154            inline Gametype* getOldGametype() const { return this->oldGametype_; }
    155155            virtual void changedGametype() {}
    156            
     156
    157157            inline void setLevel(const SmartPtr<Level>& level)
    158158            {
  • code/branches/presentation3/src/libraries/core/Event.cc

    r6859 r7127  
    6060
    6161        COUT(4) << "Processing event (EventState) : originator: " << event.originator_->getIdentifier()->getName() << " (&" << event.originator_ << "), activate: " << event.activate_ << ", name: " << event.name_ << ", statename: " << event.statename_ << ", object: " << object->getIdentifier()->getName() << " (&" << object << ")" << "." << std::endl;
    62        
     62
    6363        // check if the originator is an instance of the requested class
    6464        if (event.originator_->isA(this->subclass_))
  • code/branches/presentation3/src/libraries/core/EventIncludes.h

    r6800 r7127  
    5252    } \
    5353    XMLPortEventStateIntern(xmlportevent##function, classname, statename, xmlelement, mode)
    54    
     54
    5555#define XMLPortEventSink(classname, subclassname, statename, function, xmlelement, mode) \
    5656    orxonox::EventState* containername##function = this->getEventState(statename); \
  • code/branches/presentation3/src/libraries/core/GUIManager.h

    r7072 r7127  
    103103
    104104        static GUIManager& getInstance() { return Singleton<GUIManager>::getInstance(); } // tolua_export
    105        
     105
    106106    private:
    107107        GUIManager(const GUIManager& instance); //!< private and undefined copy c'tor (this is a singleton class)
    108108        void executeCode(const std::string& str);
    109        
     109
    110110        template <typename FunctionType>
    111111        bool protectedCall(FunctionType function);
  • code/branches/presentation3/src/libraries/core/OrxonoxClass.h

    r7008 r7127  
    108108            bool isParentOf(const OrxonoxClass* object);
    109109            bool isDirectParentOf(const OrxonoxClass* object);
    110            
     110
    111111            virtual void clone(OrxonoxClass*& item) {}
    112112
     
    172172            std::vector<std::pair<unsigned int, void*> > objectPointers_;
    173173    };
    174    
     174
    175175    SUPER_FUNCTION(11, OrxonoxClass, clone, false);
    176    
     176
    177177}
    178178
  • code/branches/presentation3/src/libraries/core/Super.h

    r6524 r7127  
    267267    #define SUPER_changedGametype(classname, functionname, ...) \
    268268        SUPER_NOARGS(classname, functionname)
    269        
     269
    270270    #define SUPER_changedUsed(classname, functionname, ...) \
    271271        SUPER_NOARGS(classname, functionname)
    272        
     272
    273273    #define SUPER_clone(classname, functionname, ...) \
    274274        SUPER_ARGS(classname, functionname, __VA_ARGS__)
    275        
     275
    276276    #define SUPER_changedCarrier(classname, functionname, ...) \
    277277        SUPER_NOARGS(classname, functionname)
    278        
     278
    279279    #define SUPER_changedPickedUp(classname, functionname, ...) \
    280280        SUPER_NOARGS(classname, functionname)
    281        
     281
    282282    // (1/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
    283283
     
    530530            ()
    531531        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
    532        
     532
    533533        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(10, changedUsed, false)
    534534            ()
     
    538538            (item)
    539539        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
    540        
     540
    541541        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(12, changedCarrier, false)
    542542            ()
    543543        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
    544        
     544
    545545        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(13, changedPickedUp, false)
    546546            ()
  • code/branches/presentation3/src/libraries/core/Template.cc

    r6938 r7127  
    107107            {
    108108                this->bLoadDefaults_ = temp->bLoadDefaults_;
    109                
     109
    110110                if (!temp->bIsReturningXMLElement_)
    111111                {
  • code/branches/presentation3/src/libraries/network/packet/Chat.cc

    r6928 r7127  
    6060  *(unsigned int *)(data_ + _MESSAGELENGTH ) = messageLength_;
    6161
    62   /* cast the hell out of the message string, and copy it into the 
    63    * data buffer. 
     62  /* cast the hell out of the message string, and copy it into the
     63   * data buffer.
    6464   */
    6565  memcpy( data_+_MESSAGE, static_cast<void*>(const_cast<char*>(message.c_str())), messageLength_ );
  • code/branches/presentation3/src/libraries/network/synchronisable/Synchronisable.h

    r7105 r7127  
    183183    }
    184184  }
    185  
     185
    186186  template <class T> void Synchronisable::registerVariable( std::set<T>& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional)
    187187  {
  • code/branches/presentation3/src/libraries/util/Serialise.h

    r7105 r7127  
    636636        return checkEquality( (unsigned char&)((mbool&)variable).getMemory(), mem );
    637637    }
    638    
     638
    639639    // =========== std::set
    640    
     640
    641641    template <class T> inline uint32_t returnSize( const std::set<T>& variable )
    642642    {
    643643        uint32_t tempsize = sizeof(uint32_t); // for the number of entries
    644644        for( typename std::set<T>::iterator it=((std::set<T>*)(&variable))->begin(); it!=((std::set<T>*)(&variable))->end(); ++it)
    645             tempsize += returnSize( *it ); 
    646         return tempsize; 
    647     }
    648    
     645            tempsize += returnSize( *it );
     646        return tempsize;
     647    }
     648
    649649    template <class T> inline void saveAndIncrease(  const std::set<T>& variable, uint8_t*& mem )
    650650    {
     
    654654            saveAndIncrease( *it, mem );
    655655    }
    656    
     656
    657657    template <class T> inline void loadAndIncrease( const std::set<T>& variable, uint8_t*& mem )
    658658    {
     
    675675        }
    676676    }
    677    
     677
    678678    template <class T> inline bool checkEquality( const std::set<T>& variable, uint8_t* mem )
    679679    {
  • code/branches/presentation3/src/modules/designtools/CreateStars.h

    r7028 r7127  
    3232#include "util/Math.h"
    3333#include "core/BaseObject.h"
    34  
     34
    3535namespace orxonox
    3636{
     
    6161            }
    6262
    63             void setColour(const orxonox::ColourValue& colour) { 
     63            void setColour(const orxonox::ColourValue& colour) {
    6464                this->colour_ = colour;
    6565            }
    6666
    67             const ColourValue& getColour() const { 
     67            const ColourValue& getColour() const {
    6868                return this->colour_;
    6969            }
     
    109109                return this->radius_;
    110110            }
    111            
     111
    112112            Vector3 PolarToCartesian(float alpha, float beta, float radius);
    113113
     
    119119            unsigned int radius_;
    120120            float alpha_;
    121             float colourDiff_; 
     121            float colourDiff_;
    122122            float alphaDiff_;
    123123            float radiusDiff_;
    124            
     124
    125125    };
    126126}
  • code/branches/presentation3/src/modules/designtools/SkyboxGenerator.cc

    r7039 r7127  
    4646
    4747
    48  
     48
    4949namespace orxonox
    5050{
     
    6868    }
    6969
    70     void SkyboxGenerator::setConfigValues( ) 
     70    void SkyboxGenerator::setConfigValues( )
    7171    {
    7272        SetConfigValue(skyboxPrefix_, "SkyboxFile_");
     
    8383                return;
    8484            }
    85            
     85
    8686            ControllableEntity* ce = HumanController::getLocalControllerSingleton()->getControllableEntity();
    8787            Camera* camera = ce->getCamera();
    8888            assert(ce);
    89        
     89
    9090            Ogre::RenderWindow* w = GraphicsManager::getInstance().getRenderWindow();
    9191
    9292
    93             switch (iterateOverDirections_) 
     93            switch (iterateOverDirections_)
    9494            {
    9595            case 0 :
     
    105105                iterateOverDirections_++;
    106106                break;
    107                
     107
    108108            case 2 :
    109109                w->writeContentsToFile(skyboxPrefix_+"lf.png");
    110                 ce->yaw(Degree(90)); 
     110                ce->yaw(Degree(90));
    111111                iterateOverDirections_++;
    112112                break;
     
    114114            case 3 :
    115115                w->writeContentsToFile(skyboxPrefix_+"bk.png");
    116                 ce->yaw(Degree(90)); 
     116                ce->yaw(Degree(90));
    117117                iterateOverDirections_++;
    118118                break;
     
    120120            case 4 :
    121121                w->writeContentsToFile(skyboxPrefix_+"rt.png");
    122                 ce->yaw(Degree(90)); 
    123                 ce->pitch(Degree(90)); 
     122                ce->yaw(Degree(90));
     123                ce->pitch(Degree(90));
    124124                iterateOverDirections_++;
    125125                break;
     
    127127            case 5 :
    128128                w->writeContentsToFile(skyboxPrefix_+"up.png");
    129                 ce->pitch(Degree(180)); 
     129                ce->pitch(Degree(180));
    130130                iterateOverDirections_++;
    131131                break;
     
    136136                iterateOverDirections_++;
    137137                break;
    138                
     138
    139139            case 7 :
    140140                camera->getOgreCamera()->setAspectRatio(aspectRatio_);
     
    152152    }
    153153
    154     void SkyboxGenerator::createSkybox( ) 
     154    void SkyboxGenerator::createSkybox( )
    155155    {
    156156        SkyboxGenerator::getInstance().takeScreenshot_ = true;
  • code/branches/presentation3/src/modules/designtools/SkyboxGenerator.h

    r6994 r7127  
    3232#include "tools/interfaces/Tickable.h"
    3333#include <OgreMath.h>
    34  
    35  
     34
     35
    3636namespace orxonox
    3737{
     
    3939    {
    4040        friend class Singleton<SkyboxGenerator>;
    41    
     41
    4242        public:
    4343            SkyboxGenerator();
     
    4949        private:
    5050            static SkyboxGenerator* singletonPtr_s;
    51             std::string skyboxPrefix_; 
     51            std::string skyboxPrefix_;
    5252            bool takeScreenshot_;
    5353            int iterateOverDirections_;
  • code/branches/presentation3/src/modules/objects/Planet.cc

    r7104 r7127  
    105105                this->mesh_.getEntity()->setCastShadows(this->bCastShadows_);
    106106                this->mesh_.setVisible(this->isVisible());
    107                
     107
    108108                float scaleFactor = this->getScale();
    109                
     109
    110110    #if OGRE_VERSION >= 0x010700
    111111                Ogre::Mesh::LodValueList distList;
     
    113113                Ogre::Mesh::LodDistanceList distList;
    114114    #endif
    115                
     115
    116116                distList.push_back(10.0f*scaleFactor);
    117117                distList.push_back(19.0f*scaleFactor);
     
    124124                distList.push_back(54.0f*scaleFactor);
    125125                distList.push_back(55.0f*scaleFactor);
    126                
     126
    127127                float reductionValue = 0.2f;
    128                
     128
    129129                this->mesh_.getEntity()->getMesh()->generateLodLevels(distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL, reductionValue);
    130130                billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->atmosphere_, Vector3(0,0,0));
    131                
     131
    132132                this->attachOgreObject(this->billboard_.getBillboardSet());
    133133                this->billboard_.getBillboardSet()->setUseAccurateFacing(true);
  • code/branches/presentation3/src/modules/objects/eventsystem/EventListener.cc

    r6856 r7127  
    6161            return;
    6262        }
    63        
     63
    6464        COUT(4) << "EventListener, processing event: originator: " << event.originator_->getIdentifier()->getName() << " (&" << event.originator_ << ")" << ", activate: " << event.activate_ << ", name: " << event.name_ << std::endl;
    6565
  • code/branches/presentation3/src/modules/objects/triggers/CheckPoint.cc

    r7045 r7127  
    3838    CreateFactory(CheckPoint);
    3939
    40     CheckPoint::CheckPoint(BaseObject* creator) 
     40    CheckPoint::CheckPoint(BaseObject* creator)
    4141        : DistanceTrigger(creator)
    4242        , RadarViewable(creator, static_cast<WorldEntity*>(this))
  • code/branches/presentation3/src/modules/objects/triggers/DistanceMultiTrigger.cc

    r6906 r7127  
    4040namespace orxonox
    4141{
    42    
     42
    4343    CreateFactory(DistanceMultiTrigger);
    4444
    4545    /**
    4646    @brief
    47         Default Constructor. Registers the object and initializes default values. 
     47        Default Constructor. Registers the object and initializes default values.
    4848    */
    4949    DistanceMultiTrigger::DistanceMultiTrigger(BaseObject* creator) : MultiTrigger(creator)
    5050    {
    5151        RegisterObject(DistanceMultiTrigger);
    52        
     52
    5353        this->distance_ = 100.0f;
    5454        this->targetName_ = BLANKSTRING;
     
    9898                continue;
    9999            }
    100            
     100
    101101            Vector3 distanceVec = entity->getWorldPosition() - this->getWorldPosition();
    102102            // If the object is no longer in range.
     
    154154                if(this->singleTargetMode_)
    155155                    entity = entity->getParent();
    156                
     156
    157157                // If no queue has been created, yet.
    158158                if(queue == NULL)
     
    166166            }
    167167        }
    168        
     168
    169169        return queue;
    170170    }
    171    
     171
    172172}
  • code/branches/presentation3/src/modules/objects/triggers/DistanceMultiTrigger.h

    r6906 r7127  
    5656    class _ObjectsExport DistanceMultiTrigger : public MultiTrigger
    5757    {
    58        
     58
    5959        public:
    6060            DistanceMultiTrigger(BaseObject* creator); //!< Default Constructor. Registers the object and initializes default values.
    6161            ~DistanceMultiTrigger(); //!< Destructor.
    62            
     62
    6363            void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a DistanceMultiTrigger object through XML.
    6464
     
    7575            inline const std::string& getTargetName(void)
    7676                { return this->targetName_; }
    77            
     77
    7878            /**
    7979            @brief Set the distance at which the DistanceMultiTrigger triggers.
     
    8888            inline float getDistance() const
    8989                { return this->distance_; }
    90                
     90
    9191        protected:
    9292            virtual std::queue<MultiTriggerState*>* letTrigger(void); //!< This method is called by the MultiTrigger to get information about new trigger events that need to be looked at.
     
    106106            inline bool removeFromRange(WorldEntity* entity)
    107107                { WeakPtr<WorldEntity>* weakptr = this->range_.find(entity)->second; bool erased = this->range_.erase(entity) > 0; if(erased) delete weakptr; return erased; }
    108                
     108
    109109        private:
    110110            float distance_; //!< The distance at which the DistanceMultiTrigger triggers.
    111111            std::string targetName_; //!< The target name, used in singleTargetMode.
    112112            bool singleTargetMode_; //!< To indicate whe the MultiDistanceTrigger is in single-target-mode.
    113            
     113
    114114            std::map<WorldEntity*, WeakPtr<WorldEntity>* > range_; //!< The set of entities that currently are in range of the DistanceMultiTrigger.
    115        
     115
    116116    };
    117    
     117
    118118}
    119119
  • code/branches/presentation3/src/modules/objects/triggers/DistanceTrigger.cc

    r6935 r7127  
    136136          continue;
    137137      }
    138      
     138
    139139      Vector3 distanceVec = entity->getWorldPosition() - this->getWorldPosition();
    140140      if (distanceVec.length() < this->distance_)
  • code/branches/presentation3/src/modules/objects/triggers/DistanceTriggerBeacon.cc

    r6906 r7127  
    3535
    3636    CreateFactory(DistanceTriggerBeacon);
    37    
     37
    3838    DistanceTriggerBeacon::DistanceTriggerBeacon(BaseObject* creator) : StaticEntity(creator)
    3939    {
    4040        RegisterObject(DistanceTriggerBeacon);
    4141    }
    42    
     42
    4343}
  • code/branches/presentation3/src/modules/objects/triggers/DistanceTriggerBeacon.h

    r6906 r7127  
    3939    class _ObjectsExport DistanceTriggerBeacon : public StaticEntity
    4040    {
    41        
     41
    4242        public:
    4343
  • code/branches/presentation3/src/modules/objects/triggers/EventMultiTrigger.cc

    r6864 r7127  
    5252    EventMultiTrigger::~EventMultiTrigger()
    5353    {
    54        
     54
    5555    }
    5656
     
    6161        this->setBroadcast(true);
    6262    }
    63    
     63
    6464    void EventMultiTrigger::XMLEventPort(Element& xmlelement, XMLPort::Mode mode)
    6565    {
  • code/branches/presentation3/src/modules/objects/triggers/EventMultiTrigger.h

    r6864 r7127  
    4444    class _ObjectsExport EventMultiTrigger : public MultiTrigger
    4545    {
    46        
     46
    4747        public:
    4848            EventMultiTrigger(BaseObject* creator);
  • code/branches/presentation3/src/modules/objects/triggers/MultiTrigger.cc

    r6864 r7127  
    4747    /*static*/ const std::string MultiTrigger::or_s = "or";
    4848    /*static*/ const std::string MultiTrigger::xor_s = "xor";
    49    
     49
    5050    CreateFactory(MultiTrigger);
    5151
     
    6565        this->bSwitch_ = false;
    6666        this->bStayActive_ = false;
    67        
     67
    6868        this->remainingActivations_ = INF_s;
    6969        this->maxNumSimultaniousTriggerers_ = INF_s;
     
    7575
    7676        this->parentTrigger_ = NULL;
    77        
     77
    7878        this->targetMask_.exclude(Class(BaseObject));
    7979
    8080        this->setSyncMode(0x0);
    8181    }
    82    
     82
    8383    /**
    8484    @brief
     
    9595        }
    9696    }
    97    
     97
    9898    /**
    9999    @brief
     
    117117        //TODO: Maybe nicer with explicit subgroup, e.g. triggers
    118118        XMLPortObject(MultiTrigger, MultiTrigger, "", addTrigger, getTrigger, xmlelement, mode);
    119        
     119
    120120        COUT(4) << "MultiTrigger '" << this->getName() << "' (&" << this << ") created." << std::endl;
    121121    }
    122    
     122
    123123
    124124    /**
     
    131131    {
    132132        // If this is the first tick.
    133         //TODO: Determine need for this, else kick it out. 
     133        //TODO: Determine need for this, else kick it out.
    134134        if(this->bFirstTick_)
    135135        {
     
    174174                    delete state;
    175175                }
    176                
     176
    177177                queue->pop();
    178178            }
     
    185185            MultiTriggerState* state;
    186186            float timeRemaining;
    187            
     187
    188188            // Go through all pending states.
    189189            for(int size = this->stateQueue_.size(); size >= 1; size--)
     
    212212                                this->triggered_.erase(state->originator);
    213213                            }
    214                            
     214
    215215                            bStateChanged = true;
    216216                        }
     
    229229
    230230                            bool bFire = true;
    231                            
     231
    232232                            // Add the originator to the objects activating this MultiTrigger.
    233233                            if(bActive == true)
     
    266266                                else
    267267                                    this->fire(bActive, state->originator);
    268                                
     268
    269269                                bStateChanged = true;
    270270                            }
     
    289289                        }
    290290                    }
    291                    
     291
    292292                    // Remove the state from the state queue.
    293293                    this->stateQueue_.pop_front();
     
    509509            return returnVal;
    510510        }
    511        
     511
    512512        return true;
    513513    }
    514    
     514
    515515    /**
    516516    @brief
     
    547547            return;
    548548        }
    549        
     549
    550550        MultiTriggerContainer* container = new MultiTriggerContainer(this, this, originator);
    551551        this->fireEvent(status, container);
     
    563563    {
    564564        ClassTreeMask& targetMask = this->getTargetMask();
    565        
     565
    566566        for(ClassTreeMaskObjectIterator it = targetMask.begin(); it != targetMask.end(); ++it)
    567567        {
     
    580580    {
    581581        assert(state);
    582        
     582
    583583        // If the originator is no target of this MultiTrigger.
    584584        if(!this->isTarget(state->originator))
    585585            return false;
    586        
     586
    587587        // Add it ot the state queue.
    588588        this->stateQueue_.push_back(std::pair<float, MultiTriggerState*>(this->delay_, state));
  • code/branches/presentation3/src/modules/objects/triggers/MultiTrigger.h

    r6864 r7127  
    9494            MultiTrigger(BaseObject* creator); //!< Constructor. Registers the objects and initializes default values.
    9595            ~MultiTrigger(); //!< Destructor.
    96            
     96
    9797            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a MultiTrigger object through XML.
    9898            virtual void tick(float dt); //!< A method that is executed each tick.
    99            
     99
    100100            bool isActive(BaseObject* triggerer = NULL); //!< Get whether the MultiTrigger is active for a given object.
    101101
     
    215215            void addTargets(const std::string& targets); //!< Add some target to the MultiTrigger.
    216216            void removeTargets(const std::string& targets); //!< Remove some target from the MultiTrigger.
    217            
     217
    218218            void addTrigger(MultiTrigger* trigger); //!< Adds a MultiTrigger as a sub-trigger to the trigger.
    219219            const MultiTrigger* getTrigger(unsigned int index) const; //!< Get the sub-trigger of this MultiTrigger at the given index.
    220            
     220
    221221        protected:
    222222            virtual std::queue<MultiTriggerState*>* letTrigger(void); //!< This method is called by the MultiTrigger to get information about new trigger events that need to be looked at.
    223223
    224224            void changeTriggered(BaseObject* originator = NULL); //!< This method can be called by any class inheriting from MultiTrigger to change it's triggered status for a specified originator.
    225            
     225
    226226            bool isModeTriggered(BaseObject* triggerer = NULL); //!< Checks whetherx the MultiTrigger is triggered concerning it's sub-triggers.
    227227            bool isTriggered(BaseObject* triggerer = NULL); //!< Get whether the MultiTrigger is triggered for a given object.
     
    236236            inline void addParentTrigger(MultiTrigger* parent)
    237237                { this->parentTrigger_ = parent; }
    238            
     238
    239239            /**
    240240            @brief Get the target mask used to identify the targets of this MultiTrigger.
     
    248248            //TODO: Check if something mus be done here.
    249249            virtual void notifyMaskUpdate(void) {}
    250            
     250
    251251        private:
    252252            static const int INF_s; //!< Magic number for infinity.
     
    257257
    258258            void subTrigggerActivityChanged(BaseObject* originator); //!< This method is called by any sub-trigger to advertise changes in it's state to it's parent-trigger.
    259            
     259
    260260            bool addState(MultiTriggerState* state); //!< Helper method. Adds a state to the state queue, where the state will wait to become active.
    261            
     261
    262262            bool checkAnd(BaseObject* triggerer); //!< Checks whether the sub-triggers amount to true for the 'and' mode for a given object.
    263263            bool checkOr(BaseObject* triggerer); //!< Checks whether the sub-triggers amount to true for the 'or' mode for a given object.
     
    276276            bool bSwitch_; //!< Bool for the switch-mode, if true the MultiTrigger behaves like a switch.
    277277            bool bStayActive_; //!< Bool for the stay-active-mode, if true the MultiTrigger stays active after its last activation.;
    278            
     278
    279279            int remainingActivations_; //!< The remaining activations of this MultiTrigger.
    280280            int maxNumSimultaniousTriggerers_; //!< The maximum number of objects simultaniously trigggering this MultiTrigger.
     
    287287            MultiTrigger* parentTrigger_;
    288288            std::set<MultiTrigger*> subTriggers_; //!< The sub-triggers of this MultiTrigger.
    289            
     289
    290290            std::set<BaseObject*> active_; //!< The set of all objects the MultiTrigger is active for.
    291291            std::set<BaseObject*> triggered_; //!< The set of all objects the MultiTrigger is triggered for.
    292292
    293293            std::deque< std::pair<float, MultiTriggerState*> > stateQueue_; //!< The queue of states waiting to become active.
    294            
     294
    295295            ClassTreeMask targetMask_; //!< The target mask, masking all objects that can trigger this MultiTrigger.
    296            
     296
    297297    };
    298298
  • code/branches/presentation3/src/modules/objects/triggers/MultiTriggerContainer.cc

    r6859 r7127  
    4040
    4141    CreateUnloadableFactory(MultiTriggerContainer);
    42    
     42
    4343    /**
    4444    @brief
     
    7373    MultiTriggerContainer::~MultiTriggerContainer()
    7474    {
    75        
     75
    7676    }
    7777
  • code/branches/presentation3/src/modules/objects/triggers/MultiTriggerContainer.h

    r6856 r7127  
    5050    class _ObjectsExport MultiTriggerContainer : public BaseObject
    5151    {
    52        
     52
    5353        public:
    5454            MultiTriggerContainer(BaseObject* creator); //!< Default constructor. Registers the object and creates an empty container.
     
    6868            inline BaseObject* getData(void)
    6969                { return this->data_; }
    70            
     70
    7171        private:
    7272            MultiTrigger* originator_; //!< The originator.
    7373            BaseObject* data_; //!< The data.
    7474    };
    75    
     75
    7676}
    7777
  • code/branches/presentation3/src/modules/overlays/hud/GametypeFadingMessage.h

    r7031 r7127  
    4646
    4747            void fadingmessage(const GametypeInfo* gtinfo, const std::string& message);
    48                  
     48
    4949        private:
    5050            PlayerInfo* owner_;
  • code/branches/presentation3/src/modules/overlays/hud/GametypeStaticMessage.cc

    r7062 r7127  
    3737{
    3838    CreateFactory(GametypeStaticMessage);
    39    
    40    
     39
     40
    4141    GametypeStaticMessage::GametypeStaticMessage(BaseObject* creator) : OverlayText(creator)
    4242    {
  • code/branches/presentation3/src/modules/overlays/hud/GametypeStaticMessage.h

    r7062 r7127  
    4949
    5050            void staticmessage(const GametypeInfo* gtinfo, const std::string& message, const ColourValue& colour);
    51            
     51
    5252        private:
    5353            PlayerInfo* owner_;
  • code/branches/presentation3/src/modules/overlays/hud/GametypeStatus.cc

    r6994 r7127  
    3939namespace orxonox
    4040{
    41     CreateFactory(GametypeStatus); 
     41    CreateFactory(GametypeStatus);
    4242
    43     /*static*/ bool GametypeStatus::noCaption_s = false; 
     43    /*static*/ bool GametypeStatus::noCaption_s = false;
    4444    SetConsoleCommand(GametypeStatus, setGametypeStatus, true);
    4545
     
    109109        GametypeStatus::noCaption_s = !bValue;
    110110    }
    111    
     111
    112112}
  • code/branches/presentation3/src/modules/overlays/hud/GametypeStatus.h

    r6994 r7127  
    5151            PlayerInfo* owner_;
    5252            static bool noCaption_s;
    53            
     53
    5454    };
    5555}
  • code/branches/presentation3/src/modules/overlays/hud/HUDNavigation.cc

    r7109 r7127  
    402402void HUDNavigation::changedOwner()
    403403{
    404    
     404
    405405    const std::set<RadarViewable*>& respawnObjects = this->getOwner()->getScene()->getRadar()->getRadarObjects();
    406406    for ( std::set<RadarViewable*>::const_iterator it = respawnObjects.begin(); it != respawnObjects.end(); ++it )
  • code/branches/presentation3/src/modules/overlays/hud/HUDNavigation.h

    r7051 r7127  
    5050
    5151    void setConfigValues();
    52    
     52
    5353    virtual void XMLPort ( Element& xmlElement, XMLPort::Mode mode );
    5454    virtual void tick ( float dt );
     
    7676
    7777    };
    78    
     78
    7979    bool showObject( RadarViewable* rv );
    8080
  • code/branches/presentation3/src/modules/overlays/hud/HUDRadar.cc

    r6984 r7127  
    4545namespace orxonox
    4646{
    47     CreateFactory(HUDRadar); 
     47    CreateFactory(HUDRadar);
    4848
    4949    HUDRadar::HUDRadar(BaseObject* creator)
  • code/branches/presentation3/src/modules/overlays/hud/HUDRadar.h

    r6942 r7127  
    6969        virtual void objectChanged( RadarViewable* rv );
    7070        void radarTick(float dt);
    71        
     71
    7272        void gatherObjects();
    7373
  • code/branches/presentation3/src/modules/pickup/DroppedPickup.cc

    r6540 r7127  
    4141namespace orxonox
    4242{
    43    
     43
    4444    CreateFactory(DroppedPickup);
    45    
     45
    4646    /**
    4747    @brief
     
    5151    {
    5252        RegisterObject(DroppedPickup);
    53        
     53
    5454    }
    5555
     
    6767    */
    6868    DroppedPickup::DroppedPickup(BaseObject* creator, Pickupable* pickup, PickupCarrier* carrier, float triggerDistance) : PickupSpawner(creator, pickup, triggerDistance, 5, 1)
    69     {   
     69    {
    7070        RegisterObject(DroppedPickup);
    7171
    7272        this->setPosition(carrier->getCarrierPosition());
    7373        this->setActive(false);
    74        
     74
    7575        //TODO: Do more elegantly.
    7676        this->startRespawnTimer();
  • code/branches/presentation3/src/modules/pickup/DroppedPickup.h

    r6540 r7127  
    4141namespace orxonox
    4242{
    43    
     43
    4444    /**
    4545    @brief
  • code/branches/presentation3/src/modules/pickup/Pickup.h

    r7008 r7127  
    165165        private:
    166166            void initialize(void); //!< Initializes the member variables.
    167            
     167
    168168            //TODO: Problems, when there are more Timers needed? Solutions?
    169169            Timer durationTimer_; //!< Timer at the disposal of each Class implementing Pickup.
  • code/branches/presentation3/src/modules/pickup/PickupCollection.cc

    r7094 r7127  
    4242namespace orxonox
    4343{
    44  
     44
    4545    CreateFactory(PickupCollection);
    4646
     
    5252    {
    5353        RegisterObject(PickupCollection);
    54        
     54
    5555        this->pickupCollectionIdentifier_ = new PickupCollectionIdentifier(this);
    5656    }
    57    
     57
    5858    /**
    5959    @brief
     
    6969        }
    7070    }
    71    
     71
    7272    /**
    7373    @brief
     
    7777    {
    7878        SUPER(PickupCollection, XMLPort, xmlelement, mode);
    79        
     79
    8080        XMLPortObject(PickupCollection, Pickupable, "pickupables", addPickupable, getPickupable, xmlelement, mode);
    81        
     81
    8282        this->initializeIdentifier();
    8383    }
    84    
     84
    8585    /**
    8686    @brief
     
    9494        }
    9595    }
    96    
     96
    9797    /**
    9898    @brief
     
    103103    {
    104104        SUPER(PickupCollection, changedUsed);
    105        
     105
    106106        //! Change used for all Pickupables this PickupCollection consists of.
    107107        for(std::vector<WeakPtr<Pickupable> >::iterator it = this->pickups_.begin(); it != this->pickups_.end(); it++)
     
    110110        }
    111111    }
    112    
     112
    113113    /**
    114114    @brief
     
    119119    {
    120120        SUPER(PickupCollection, changedCarrier);
    121        
     121
    122122        //! Change the PickupCarrier for all Pickupables this PickupCollection consists of.
    123123        for(std::vector<WeakPtr<Pickupable> >::iterator it = this->pickups_.begin(); it != this->pickups_.end(); it++)
     
    126126        }
    127127    }
    128    
     128
    129129    /**
    130130    @brief
     
    135135    {
    136136        SUPER(PickupCollection, changedPickedUp);
    137        
     137
    138138        //! Change the pickedUp status for all Pickupables this PickupCollection consists of.
    139139        for(std::vector<WeakPtr<Pickupable> >::iterator it = this->pickups_.begin(); it != this->pickups_.end(); it++)
     
    142142        }
    143143    }
    144    
     144
    145145    /**
    146146    @brief
     
    154154        if(item == NULL)
    155155            item = new PickupCollection(this);
    156        
     156
    157157        SUPER(PickupCollection, clone, item);
    158        
     158
    159159        PickupCollection* pickup = dynamic_cast<PickupCollection*>(item);
    160160        //! Clone all Pickupables this PickupCollection consist of.
     
    167167        pickup->initializeIdentifier();
    168168    }
    169    
     169
    170170    /**
    171171    @brief
     
    183183                return false;
    184184        }
    185        
     185
    186186        return true;
    187187    }
    188    
     188
    189189    /**
    190190    @brief
     
    198198        return this->pickupCollectionIdentifier_;
    199199    }
    200    
     200
    201201    /**
    202202    @brief
     
    211211        if(pickup == NULL)
    212212            return false;
    213        
     213
    214214        WeakPtr<Pickupable> ptr = pickup; //!< Create a weak pointer to be able to test in the constructor if the Pointer is still valid.
    215215        this->pickups_.push_back(ptr);
    216216        return true;
    217217    }
    218    
     218
    219219    /**
    220220    @brief
     
    229229        return this->pickups_[index].get();
    230230    }
    231        
     231
    232232    /**
    233233    @brief
     
    245245        return true;
    246246    }
    247    
     247
    248248}
  • code/branches/presentation3/src/modules/pickup/PickupCollection.h

    r6731 r7127  
    5353    class _PickupExport PickupCollection : public Pickupable, public BaseObject
    5454    {
    55        
     55
    5656        public:
    57            
     57
    5858            PickupCollection(BaseObject* creator); //!< Default Constructor.
    5959            virtual ~PickupCollection(); //!< Destructor.
    60            
     60
    6161            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Creates an instance of this Class through XML.
    6262
     
    6464            virtual void changedCarrier(void); //!< Is called when the pickup has changed its PickupCarrier.
    6565            virtual void changedPickedUp(void); //!< Is called when the pickup has transited from picked up to dropped or the other way around.
    66            
     66
    6767            virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
    68            
     68
    6969            virtual bool isTarget(PickupCarrier* carrier) const; //!< Get whether a given class, represented by the input Identifier, is a target of this PickupCollection.
    70            
     70
    7171            virtual const PickupIdentifier* getPickupIdentifier(void); //!< Get the PickupIdentifier of this PickupCollection.
    72            
     72
    7373            bool addPickupable(Pickupable* pickup); //!< Add the input Pickupable to list of Pickupables combined by this PickupCollection.
    7474            const Pickupable* getPickupable(unsigned int index); //!< Get the Pickupable at the given index.
    75            
     75
    7676        protected:
    7777            void initializeIdentifier(void); //!< Initializes the PickupIdentifier for this pickup.
    78            
     78
    7979            virtual bool createSpawner(void); //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
    80            
     80
    8181            PickupCollectionIdentifier* pickupCollectionIdentifier_; //!< The PickupCollectionIdentifier of this PickupCollection. Is used to distinguish different PickupCollections amongst themselves.
    82            
     82
    8383        private:
    84            
     84
    8585            std::vector<WeakPtr<Pickupable> > pickups_; //!< The list of the pointers of all the Pickupables this PickupCollection consists of. They are weak pointers to facilitate testing, whether the pointers are still valid.
    86        
     86
    8787    };
    88    
     88
    8989}
    9090
  • code/branches/presentation3/src/modules/pickup/PickupCollectionIdentifier.cc

    r6538 r7127  
    3838namespace orxonox
    3939{
    40    
     40
    4141    /**
    4242    @brief
     
    4747        RegisterObject(PickupCollectionIdentifier);
    4848    }
    49    
     49
    5050    /**
    5151    @brief
     
    5454    PickupCollectionIdentifier::~PickupCollectionIdentifier()
    5555    {
    56        
     56
    5757    }
    5858
     
    7070        PickupIdentifier* temp = const_cast<PickupIdentifier*>(identifier);
    7171        const PickupCollectionIdentifier* collectionIdentifier = dynamic_cast<PickupCollectionIdentifier*>(temp);
    72        
     72
    7373        //! If the input PickupIdentifier 'identifier' is no PickupCollectionIdentifier then just the two PickupIdentifiers are compared.
    7474        if(collectionIdentifier == NULL)
     
    7676            return this->PickupIdentifier::compare(identifier);
    7777        }
    78        
     78
    7979        //! If the number of Pickupables each of the two PickupCollectionIdentifiers contain differ, the one with less is considered smaller.
    8080        if(this->identifiers_.size() != collectionIdentifier->identifiers_.size())
    8181            return this->identifiers_.size()-collectionIdentifier->identifiers_.size();
    82        
     82
    8383        //! Compare the Pickupables of the two PickupCollectionIdentifiers one after the other. the one with the first 'smaller' one is considered smaller.
    8484        std::set<const PickupIdentifier*, PickupIdentifierCompare>::const_iterator it2 = collectionIdentifier->identifiers_.begin();
    8585        for(std::set<const PickupIdentifier*, PickupIdentifierCompare>::const_iterator it = this->identifiers_.begin(); it != this->identifiers_.end(); it++)
    8686        {
    87            
     87
    8888            if((*it)->compare(*it2) < 0)
    8989                return -1;
     
    9191                return 1;
    9292        }
    93        
     93
    9494        //! Means they are equal.
    9595        return 0;
    9696    }
    97    
     97
    9898    /**
    9999    @brief
     
    106106        this->identifiers_.insert(identifier);
    107107    }
    108    
     108
    109109}
    110110
  • code/branches/presentation3/src/modules/pickup/PickupCollectionIdentifier.h

    r6538 r7127  
    5454    class _PickupExport PickupCollectionIdentifier : public PickupIdentifier
    5555    {
    56        
     56
    5757        public:
    5858            PickupCollectionIdentifier(Pickupable* pickup); //!< Constructor.
    5959            ~PickupCollectionIdentifier(); //!< Destructor.
    60            
     60
    6161            virtual int compare(const PickupIdentifier* identifier) const; //!< Compares a PickupCollectionIdentifier with a PickupIdentifier.
    62            
     62
    6363            void addPickup(const PickupIdentifier* identifier); //!< Add a Pickupable to the PickupCollectionIdentifier.
    64            
     64
    6565        private:
    6666            std::set<const PickupIdentifier*, PickupIdentifierCompare> identifiers_; //!< The set of PickupIdentifiers of the Pickupables the PickupCollection with this PickupCollectionIdentifier consists of, ordered by the rule set by PickupIdentifierCompare.
    67            
     67
    6868    };
    69    
     69
    7070}
    7171
  • code/branches/presentation3/src/modules/pickup/PickupManager.cc

    r7110 r7127  
    5151    // Register tolua_open function when loading the library
    5252    DeclareToluaInterface(Pickup);
    53    
     53
    5454    ManageScopedSingleton(PickupManager, ScopeID::Root, false);
    55    
     55
    5656    /*static*/ const std::string PickupManager::guiName_s = "PickupInventory";
    57    
     57
    5858    /**
    5959    @brief
     
    6969        }
    7070        this->defaultRepresentation_ = new PickupRepresentation();
    71        
     71
    7272        COUT(3) << "PickupManager created." << std::endl;
    7373    }
    74    
     74
    7575    /**
    7676    @brief
     
    8282        if(this->defaultRepresentation_ != NULL)
    8383            this->defaultRepresentation_->destroy();
    84        
     84
    8585        this->representations_.clear();
    86        
     86
    8787        COUT(3) << "PickupManager destroyed." << std::endl;
    8888    }
    89    
     89
    9090    /**
    9191    @brief
     
    100100    */
    101101    bool PickupManager::registerRepresentation(const PickupIdentifier* identifier, PickupRepresentation* representation)
    102     {       
     102    {
    103103        if(identifier == NULL || representation == NULL || this->representations_.find(identifier) != this->representations_.end()) //!< If the Pickupable already has a Representation registered.
    104104            return false;
    105        
     105
    106106        this->representations_[identifier] = representation;
    107        
     107
    108108        COUT(4) << "PickupRepresentation " << representation << " registered with the PickupManager." << std::endl;
    109109        return true;
    110110    }
    111    
     111
    112112    /**
    113113    @brief
     
    121121    */
    122122    bool PickupManager::unregisterRepresentation(const PickupIdentifier* identifier, PickupRepresentation* representation)
    123     {       
     123    {
    124124        if(identifier == NULL || representation == NULL)
    125125            return false;
    126        
     126
    127127        std::map<const PickupIdentifier*, PickupRepresentation*, PickupIdentifierCompare>::iterator it = this->representations_.find(identifier);
    128128        if(it == this->representations_.end()) //!< If the Pickupable is not registered in the first place.
    129129            return false;
    130        
     130
    131131        this->representations_.erase(it);
    132        
     132
    133133        COUT(4) << "PickupRepresentation " << representation << " unregistered with the PickupManager." << std::endl;
    134134        return true;
    135135    }
    136    
     136
    137137    /**
    138138    @brief
     
    151151            return this->defaultRepresentation_;
    152152        }
    153        
     153
    154154        return it->second;
    155155    }
     
    158158    {
    159159        this->pickupsList_.clear();
    160        
     160
    161161        PlayerInfo* player = GUIManager::getInstance().getPlayer(PickupManager::guiName_s);
    162162        PickupCarrier* carrier = NULL;
     
    221221        if(pickup == NULL || it == this->pickupsList_.end() || it->second.get() == NULL)
    222222            return;
    223        
     223
    224224        if(!pickup->isPickedUp())
    225225            return;
     
    229229            pickup->setUsed(use);
    230230    }
    231    
     231
    232232}
  • code/branches/presentation3/src/modules/pickup/PickupManager.h

    r6996 r7127  
    6060    { // tolua_export
    6161        friend class Singleton<PickupManager>;
    62        
     62
    6363        public:
    6464            PickupManager();
    6565            virtual ~PickupManager();
    66            
     66
    6767            static PickupManager& getInstance() { return Singleton<PickupManager>::getInstance(); } // tolua_export
    68            
     68
    6969            bool registerRepresentation(const PickupIdentifier* identifier, PickupRepresentation* representation); //!< Registers a PickupRepresentation together with the PickupIdentifier of the Pickupable the PickupRepresentation represents.
    7070            bool unregisterRepresentation(const PickupIdentifier* identifier, PickupRepresentation* representation); //!< Unegisters a PickupRepresentation together with the PickupIdentifier of the Pickupable the PickupRepresentation represents.
    7171            PickupRepresentation* getRepresentation(const PickupIdentifier* identifier); //!< Get the PickupRepresentation representing the Pickupable with the input PickupIdentifier.
    72            
     72
    7373            // tolua_begin
    7474            int getNumPickups(void);
     
    8080            bool isValidPickup(orxonox::Pickupable* pickup) { std::map<Pickupable*, WeakPtr<Pickupable> >::iterator it = this->pickupsList_.find(pickup); if(it == this->pickupsList_.end()) return false; return it->second.get() != NULL; }
    8181            // tolua_end
    82            
     82
    8383        private:
    8484            static PickupManager* singletonPtr_s;
    8585            static const std::string guiName_s;
    86            
     86
    8787            PickupRepresentation* defaultRepresentation_; //!< The default PickupRepresentation.
    8888            std::map<const PickupIdentifier*, PickupRepresentation*, PickupIdentifierCompare> representations_; //!< Map linking PickupIdentifiers (representing types if Pickupables) and PickupRepresentations.
     
    9292
    9393            std::vector<PickupCarrier*>* getAllCarriers(PickupCarrier* carrier);
    94        
     94
    9595    }; // tolua_export
    96    
     96
    9797} // tolua_export
    9898
  • code/branches/presentation3/src/modules/pickup/PickupPrereqs.h

    r7034 r7127  
    6565namespace orxonox
    6666{
    67    
     67
    6868    class DroppedPickup;
    6969    class Pickup;
  • code/branches/presentation3/src/modules/pickup/PickupRepresentation.cc

    r6725 r7127  
    4141namespace orxonox
    4242{
    43    
     43
    4444    CreateFactory(PickupRepresentation);
    45    
     45
    4646    /**
    4747    @brief
     
    5252    {
    5353        RegisterObject(PickupRepresentation);
    54        
     54
    5555        this->initialize();
    5656    }
    57    
     57
    5858    /**
    5959    @brief
     
    6363    {
    6464        RegisterObject(PickupRepresentation);
    65        
     65
    6666        this->initialize();
    6767    }
    68    
     68
    6969    /**
    7070    @brief
     
    7575        if(this->spawnerRepresentation_ != NULL)
    7676            this->spawnerRepresentation_->destroy();
    77        
     77
    7878        if(this->pickup_ != NULL)
    7979            PickupManager::getInstance().unregisterRepresentation(this->pickup_->getPickupIdentifier(), this);
    8080    }
    81    
     81
    8282    /**
    8383    @brief
     
    9191        this->inventoryRepresentation_ = "Default";
    9292    }
    93    
     93
    9494    /**
    9595    @brief
     
    9999    {
    100100        SUPER(PickupRepresentation, XMLPort, xmlelement, mode);
    101        
     101
    102102        XMLPortParam(PickupRepresentation, "pickupName", setPickupName, getPickupName, xmlelement, mode);
    103103        XMLPortParam(PickupRepresentation, "pickupDescription", setPickupDescription, getPickupDescription, xmlelement, mode);
     
    106106        XMLPortObject(PickupRepresentation, Pickupable, "pickup", setPickup, getPickup, xmlelement, mode);
    107107        XMLPortObject(PickupRepresentation, StaticEntity, "spawner-representation", setSpawnerRepresentation, getSpawnerRepresentationIndex, xmlelement, mode);
    108        
     108
    109109        PickupManager::getInstance().registerRepresentation(this->pickup_->getPickupIdentifier(), this); //!< Registers the PickupRepresentation with the PickupManager through the PickupIdentifier of the Pickupable it represents.
    110        
     110
    111111        if(this->spawnerRepresentation_ != NULL)
    112112            this->spawnerRepresentation_->setVisible(false);
    113        
     113
    114114        COUT(4) << "PickupRepresentation created: name: '" << this->name_ << "', description: '" << this->description_ << "', spawnerTemplate: '" << this->spawnerTemplate_ << "'." << std::endl;
    115115    }
    116    
     116
    117117    /**
    118118    @brief
     
    136136            this->addTemplate(this->spawnerTemplate_);
    137137        }
    138        
     138
    139139        StaticEntity* representation = this->spawnerRepresentation_;
    140140        representation->setVisible(true);
    141        
     141
    142142        this->addTemplate(this->spawnerTemplate_);
    143143        this->spawnerRepresentation_->setVisible(false);
    144        
     144
    145145        return representation;
    146146    }
    147    
     147
    148148    /**
    149149    @brief
     
    171171        return representation;
    172172    }
    173    
     173
    174174}
  • code/branches/presentation3/src/modules/pickup/PickupRepresentation.h

    r6711 r7127  
    5656        : public BaseObject
    5757    { // tolua_export
    58        
     58
    5959        public:
    6060            PickupRepresentation(); //!< Constructor
    6161            PickupRepresentation(BaseObject* creator); //!< Default constructor.
    6262            virtual ~PickupRepresentation(); //!< Destructor.
    63            
     63
    6464            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    65            
     65
    6666            /**
    6767            @brief Set the name of the Pickupable represented by this PickupRepresentation.
     
    102102            inline void setPickup(Pickupable* pickup)
    103103                { this->pickup_ = pickup; }
    104                
     104
    105105            /**
    106106            @brief Get the name of the Pickupable represented by this PickupRepresentation.
     
    138138            inline const Pickupable* getPickup(unsigned int index)
    139139                { if(index == 0) return this->pickup_; return NULL; }
    140                
     140
    141141            StaticEntity* getSpawnerRepresentation(PickupSpawner* spawner); //!< Get a spawnerRepresentation for a specific PickupSpawner.
    142        
     142
    143143        private:
    144144            void initialize(void); //!< Initializes the member variables of this PickupRepresentation.
    145145            StaticEntity* getDefaultSpawnerRepresentation(PickupSpawner* spawner); //!< Get the default spawnerRepresentation for a specific PickupSpawner.
    146            
     146
    147147            std::string name_; //!< The name of the Pickupable represented by this PickupRepresentation.
    148148            std::string description_; //!< The description of the Pickupable represented by this PickupRepresentation.
     
    150150            StaticEntity* spawnerRepresentation_; //!< The spawnerRepresentation of this PickupRepresentation.
    151151            std::string inventoryRepresentation_; //!< The name of an image representing the pickup in the PickupInventory. TODO: Exact format and placement of image?
    152            
     152
    153153            Pickupable* pickup_; //!< The Pickupable that is represented by this PickupRepresentation.
    154            
     154
    155155    }; // tolua_export
    156156
    157157} // tolua_export
    158    
     158
    159159#endif // _PickupRepresentation_H__
  • code/branches/presentation3/src/modules/pickup/PickupSpawner.cc

    r7086 r7127  
    5555    {
    5656        RegisterObject(PickupSpawner);
    57        
     57
    5858        this->initialize();
    5959    }
     
    7676    {
    7777        RegisterObject(PickupSpawner);
    78        
     78
    7979        this->initialize();
    80  
     80
    8181        this->pickup_ = pickup;
    8282
     
    8484        this->respawnTime_ = respawnTime;
    8585        this->setMaxSpawnedItems(maxSpawnedItems);
    86        
     86
    8787        if(this->pickup_ == NULL)
    8888        {
     
    132132
    133133        XMLPortObject(PickupSpawner, Pickupable, "pickup", setPickupable, getPickupable, xmlelement, mode);
    134        
     134
    135135        XMLPortParam(PickupSpawner, "triggerDistance", setTriggerDistance, getTriggerDistance, xmlelement, mode);
    136136        XMLPortParam(PickupSpawner, "respawnTime", setRespawnTime, getRespawnTime, xmlelement, mode);
    137137        XMLPortParam(PickupSpawner, "maxSpawnedItems", setMaxSpawnedItems, getMaxSpawnedItems, xmlelement, mode);
    138        
     138
    139139        if(this->pickup_ == NULL)
    140140        {
     
    150150        }
    151151    }
    152    
     152
    153153    /**
    154154    @brief
     
    161161        this->setVisible(this->isActive());
    162162    }
    163      
     163
    164164    /**
    165165    @brief
     
    172172    {
    173173        SUPER(PickupSpawner, tick, dt);
    174        
     174
    175175        //! If the PickupSpawner is active.
    176176        if (this->isActive())
    177177        {
    178178            SmartPtr<PickupSpawner> temp = this; // create a smart pointer to keep the PickupSpawner alive until we iterated through all Pawns (in case a Pawn takes the last pickup)
    179            
     179
    180180            //! Iterate trough all Pawns.
    181181            for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it)
     
    191191        }
    192192    }
    193    
     193
    194194    /**
    195195    @brief
     
    203203        this->spawnsRemaining_ = items;
    204204    }
    205    
     205
    206206    /**
    207207    @brief
     
    230230        }
    231231    }
    232    
     232
    233233    /**
    234234    @brief
     
    239239        this->respawnTimer_.setTimer(this->respawnTime_, false, createExecutor(createFunctor(&PickupSpawner::respawnTimerCallback, this)));
    240240    }
    241    
     241
    242242    /**
    243243    @brief
     
    258258            return;
    259259        }
    260        
     260
    261261        this->pickup_ = pickup;
    262262    }
    263    
     263
    264264    /**
    265265    @brief
     
    285285        {
    286286            COUT(4) << "PickupSpawner (&" << this << ") triggered and active." << std::endl;
    287            
     287
    288288            PickupCarrier* carrier = dynamic_cast<PickupCarrier*>(pawn);
    289289            if(carrier == NULL)
     
    292292                return;
    293293            }
    294            
     294
    295295            if(!carrier->isTarget(this->pickup_))
    296296            {
     
    298298                return;
    299299            }
    300            
     300
    301301            PickupCarrier* target = carrier->getTarget(this->pickup_);
    302302            Pickupable* pickup = this->getPickup();
    303            
     303
    304304            if(target != NULL && pickup != NULL)
    305305            {
     
    317317                if(target == NULL)
    318318                    COUT(1) << "PickupSpawner (&" << this << "): Pickupable has no target." << std::endl;
    319                
     319
    320320                if(pickup == NULL)
    321321                {
     
    335335    @return
    336336        The Pickupable created.
    337     */   
     337    */
    338338    Pickupable* PickupSpawner::getPickup(void)
    339339    {
     
    343343            return NULL;
    344344        }
    345        
     345
    346346        Pickupable* pickup = this->pickup_->clone();
    347347        return pickup;
  • code/branches/presentation3/src/modules/pickup/PickupSpawner.h

    r6540 r7127  
    101101        protected:
    102102            void decrementSpawnsRemaining(void); //!< Decrements the number of remaining spawns.
    103                        
     103
    104104            void startRespawnTimer(void);
    105            
     105
    106106            virtual Pickupable* getPickup(void); //!< Creates a new Pickupable.
    107            
     107
    108108            void setPickupable(Pickupable* pickup); //!< Sets a Pickupable for the PickupSpawner to spawn.
    109109            const Pickupable* getPickupable(void); //!< Get the Pickupable that is spawned by this PickupSpawner.
    110            
     110
    111111            Pickupable* pickup_; //!< The pickup to be spawned.
    112112
    113113        private:
    114114            void initialize(void);
    115            
     115
    116116            void trigger(Pawn* pawn); //!< Method called when a Pawn is close enough.
    117117            void respawnTimerCallback(); //!< Method called when the timer runs out.
  • code/branches/presentation3/src/modules/pickup/items/DronePickup.cc

    r7034 r7127  
    4949
    5050    CreateFactory(DronePickup);
    51    
     51
    5252    /**
    5353    @brief
     
    5757    {
    5858        RegisterObject(DronePickup);
    59        
     59
    6060        this->initialize();
    6161    }
    62    
     62
    6363    /**
    6464    @brief
     
    6767    DronePickup::~DronePickup()
    6868    {
    69        
     69
    7070    }
    71    
     71
    7272    /**
    73     @brief 
     73    @brief
    7474        Initializes the member variables.
    7575    */
     
    8080        this->droneTemplate_ = "";
    8181    }
    82    
     82
    8383    /**
    8484    @brief
     
    9191        this->pickupIdentifier_->addParameter(type, val);
    9292    }
    93    
     93
    9494    /**
    9595    @brief
     
    100100        SUPER(DronePickup, XMLPort, xmlelement, mode);
    101101        XMLPortParam(DronePickup, "droneTemplate", setDroneTemplate, getDroneTemplate, xmlelement, mode);
    102        
     102
    103103        this->initializeIdentifier();
    104104    }
    105    
     105
    106106    void DronePickup::setDroneTemplate(std::string templatename){
    107107        droneTemplate_ = templatename;
    108     } 
    109    
     108    }
     109
    110110    const std::string& DronePickup::getDroneTemplate() const
    111111    {
     
    120120    {
    121121        SUPER(DronePickup, changedUsed);
    122        
     122
    123123        //! If the pickup is not picked up nothing must be done.
    124124        if(!this->isPickedUp())
    125125            return;
    126        
     126
    127127        //! If the pickup has transited to used.
    128128        if(this->isUsed())
     
    132132                if(pawn == NULL) //!< If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
    133133                    this->destroy();
    134                
     134
    135135                //Attach to pawn
    136136                Drone* drone = new Drone(pawn->getCreator()); // this is neccessary because the projectiles fired need a valid creator for the particlespawner (when colliding against something)
     
    143143                    droneController->setOwner(pawn);
    144144                }
    145                
     145
    146146                Vector3 spawnPosition = pawn->getWorldPosition() + Vector3(30,0,-30);
    147147                drone->setPosition(spawnPosition);
    148                
     148
    149149                //! The pickup has been used up.
    150150                this->setUsed(false);
     
    159159        }
    160160    }
    161    
     161
    162162    /**
    163163    @brief
     
    170170        PickupCarrier* carrier = this->getCarrier();
    171171        Pawn* pawn = dynamic_cast<Pawn*>(carrier);
    172        
     172
    173173        if(pawn == NULL)
    174174        {
    175175            COUT(1) << "Invalid PickupCarrier in DronePickup." << std::endl;
    176176        }
    177        
     177
    178178        return pawn;
    179179    }
    180    
     180
    181181    /**
    182182    @brief
     
    189189        if(item == NULL)
    190190            item = new DronePickup(this);
    191        
     191
    192192        SUPER(DronePickup, clone, item);
    193        
     193
    194194        DronePickup* pickup = dynamic_cast<DronePickup*>(item);
    195195        pickup->setDroneTemplate(this->getDroneTemplate());
    196        
     196
    197197        pickup->initializeIdentifier();
    198198    }
  • code/branches/presentation3/src/modules/pickup/items/DronePickup.h

    r7034 r7127  
    4747
    4848namespace orxonox {
    49    
     49
    5050
    5151    class _PickupExport DronePickup : public Pickup, public Tickable
    5252    {
    5353        public:
    54        
     54
    5555            DronePickup(BaseObject* creator); //!< Constructor.
    5656            virtual ~DronePickup(); //!< Destructor.
    57            
     57
    5858            virtual void XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode); //!< Method for creating a DronePickup object through XML.
    59            
     59
    6060            virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
    6161            virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
    6262
    6363            void setDroneTemplate(std::string templatename);
    64             const std::string& getDroneTemplate() const; 
    65            
     64            const std::string& getDroneTemplate() const;
     65
    6666        protected:
    6767            void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
    68        
     68
    6969        private:
    7070            void initialize(void); //!< Initializes the member variables.
    7171            std::string droneTemplate_;
    7272            Pawn* carrierToPawnHelper(void); //!< Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
    73            
    7473
    75        
     74
     75
    7676    };
    7777}
  • code/branches/presentation3/src/modules/pickup/items/HealthPickup.cc

    r7008 r7127  
    4545namespace orxonox
    4646{
    47    
     47
    4848    /*static*/ const std::string HealthPickup::healthTypeLimited_s = "limited";
    4949    /*static*/ const std::string HealthPickup::healthTypeTemporary_s = "temporary";
    5050    /*static*/ const std::string HealthPickup::healthTypePermanent_s = "permanent";
    51    
     51
    5252    CreateFactory(HealthPickup);
    53    
     53
    5454    /**
    5555    @brief
     
    5959    {
    6060        RegisterObject(HealthPickup);
    61        
     61
    6262        this->initialize();
    6363    }
    64    
     64
    6565    /**
    6666    @brief
     
    6969    HealthPickup::~HealthPickup()
    7070    {
    71        
    72     }
    73    
    74     /**
    75     @brief 
     71
     72    }
     73
     74    /**
     75    @brief
    7676        Initializes the member variables.
    7777    */
    7878    void HealthPickup::initialize(void)
    79     {       
     79    {
    8080        this->health_ = 0;
    8181        this->healthRate_ = 0;
     
    8383        this->maxHealthSave_ = 0;
    8484        this->maxHealthOverwrite_ = 0;
    85        
     85
    8686        this->addTarget(ClassIdentifier<Pawn>::getIdentifier());
    8787    }
    88    
     88
    8989    /**
    9090    @brief
     
    9898        std::string val1 = stream.str();
    9999        this->pickupIdentifier_->addParameter(type1, val1);
    100        
     100
    101101        std::string val2 = this->getHealthType();
    102102        std::string type2 = "healthType";
    103103        this->pickupIdentifier_->addParameter(type2, val2);
    104        
     104
    105105        stream.clear();
    106106        stream << this->getHealthRate();
     
    109109        this->pickupIdentifier_->addParameter(type3, val3);
    110110    }
    111    
     111
    112112    /**
    113113    @brief
     
    117117    {
    118118        SUPER(HealthPickup, XMLPort, xmlelement, mode);
    119        
     119
    120120        XMLPortParam(HealthPickup, "health", setHealth, getHealth, xmlelement, mode);
    121121        XMLPortParam(HealthPickup, "healthRate", setHealthRate, getHealthRate, xmlelement, mode);
    122122        XMLPortParam(HealthPickup, "healthType", setHealthType, getHealthType, xmlelement, mode);
    123        
     123
    124124        if(!this->isContinuous())
    125125            this->healthRate_ = 0.0;
    126        
     126
    127127        this->initializeIdentifier();
    128128    }
    129    
     129
    130130    /**
    131131    @brief
     
    138138    {
    139139        SUPER(HealthPickup, tick, dt);
    140        
     140
    141141        if(this->isContinuous() && this->isUsed())
    142142        {
     
    144144            if(pawn == NULL) //!< If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
    145145                this->destroy();
    146            
     146
    147147            //! Calculate the health that is added this tick.
    148148            float health = dt*this->getHealthRate();
     
    152152            float fullHealth = pawn->getHealth() + health;
    153153            this->setHealth(this->getHealth()-health);
    154                    
     154
    155155            switch(this->getHealthTypeDirect())
    156156            {
     
    173173                    COUT(1) << "Invalid healthType in HealthPickup." << std::endl;
    174174            }
    175            
     175
    176176            //! If all health has been transfered.
    177177            if(this->getHealth() == 0)
     
    181181        }
    182182    }
    183    
     183
    184184    /**
    185185    @brief
     
    193193        if(!this->isPickedUp())
    194194            return;
    195        
     195
    196196        //! If the pickup has transited to used.
    197197        if(this->isUsed())
     
    202202                if(pawn == NULL) //!< If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
    203203                    this->destroy();
    204                
     204
    205205                float health = 0;
    206206                switch(this->getHealthTypeDirect())
     
    226226                        COUT(1) << "Invalid healthType in HealthPickup." << std::endl;
    227227                }
    228                
     228
    229229                //! The pickup has been used up.
    230230                this->setUsed(false);
     
    237237                PickupCarrier* carrier = this->getCarrier();
    238238                Pawn* pawn = dynamic_cast<Pawn*>(carrier);
    239                
     239
    240240                if(pawn == NULL)
    241241                {
     
    244244                    return;
    245245                }
    246                
     246
    247247                if(pawn->getMaxHealth() == this->maxHealthOverwrite_)
    248248                {
     
    252252                }
    253253            }
    254            
     254
    255255            //! If either the pickup can only be used once or it is continuous and used up, it is destroyed upon setting it to unused.
    256256            if(this->isOnce() || (this->isContinuous() && this->getHealth() == 0))
     
    260260        }
    261261    }
    262    
     262
    263263    /**
    264264    @brief
     
    271271        PickupCarrier* carrier = this->getCarrier();
    272272        Pawn* pawn = dynamic_cast<Pawn*>(carrier);
    273        
     273
    274274        if(pawn == NULL)
    275275        {
    276276            COUT(1) << "Invalid PickupCarrier in HealthPickup." << std::endl;
    277277        }
    278        
     278
    279279        return pawn;
    280280    }
    281    
     281
    282282    /**
    283283    @brief
     
    297297        pickup->setHealthRate(this->getHealthRate());
    298298        pickup->setHealthTypeDirect(this->getHealthTypeDirect());
    299        
     299
    300300        pickup->initializeIdentifier();
    301301    }
    302    
     302
    303303    /**
    304304    @brief
     
    322322        }
    323323    }
    324    
     324
    325325    /**
    326326    @brief
     
    341341        }
    342342    }
    343    
     343
    344344    /**
    345345    @brief
     
    356356        else
    357357        {
    358             COUT(1) << "Invalid healthSpeed in HealthPickup." << std::endl; 
    359         }
    360     }
    361    
     358            COUT(1) << "Invalid healthSpeed in HealthPickup." << std::endl;
     359        }
     360    }
     361
    362362    /**
    363363    @brief
  • code/branches/presentation3/src/modules/pickup/items/HealthPickup.h

    r6709 r7127  
    4545
    4646namespace orxonox {
    47    
     47
    4848    //! Enum for the type of the HealthPickup
    4949    namespace pickupHealthType
     
    5656        };
    5757    }
    58    
     58
    5959    /**
    6060    @brief
     
    7171    {
    7272        public:
    73        
     73
    7474            HealthPickup(BaseObject* creator); //!< Constructor.
    7575            virtual ~HealthPickup(); //!< Destructor.
    76            
     76
    7777            virtual void XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode); //!< Method for creating a HealthPickup object through XML.
    7878            virtual void tick(float dt); //!< Is called every tick.
    79            
     79
    8080            virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
    8181            virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
    82            
     82
    8383            /**
    8484            @brief Get the health that is transfered to the Pawn upon usage of this pickup.
     
    9393            inline float getHealthRate(void)
    9494                { return this->healthRate_; }
    95                
     95
    9696            /**
    9797            @brief Get the type of HealthPickup, this pickup is.
    98             @return Returns the health type as an enum. 
     98            @return Returns the health type as an enum.
    9999            */
    100100            inline pickupHealthType::Value getHealthTypeDirect(void)
    101101                { return this->healthType_; }
    102102            const std::string& getHealthType(void); //!< Get the health type of this pickup.
    103            
     103
    104104        protected:
    105105            void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
     
    107107            void setHealth(float health); //!< Sets the health.
    108108            void setHealthRate(float speed); //!< Set the rate at which health is transferred if the pickup is continuous.
    109            
     109
    110110            /**
    111111            @brief Set the health type of this pickup.
     
    115115                { this->healthType_ = type; }
    116116            void setHealthType(std::string type); //!< Set the type of the HealthPickup.
    117        
     117
    118118        private:
    119119            void initialize(void); //!< Initializes the member variables.
    120120            Pawn* carrierToPawnHelper(void); //!< Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
    121            
     121
    122122            float health_; //!< The health that is transferred to the Pawn.
    123123            float healthRate_; //!< The rate at which the health is transferred.
     
    125125            float maxHealthOverwrite_; //!< Helper to remember with which value we overwrote the maxHealh, to detect if someone else changed it as well.
    126126            pickupHealthType::Value healthType_; //!< The type of the HealthPickup.
    127            
     127
    128128            //! Strings for the health types.
    129129            static const std::string healthTypeLimited_s;
    130130            static const std::string healthTypeTemporary_s;
    131131            static const std::string healthTypePermanent_s;
    132        
     132
    133133    };
    134134}
  • code/branches/presentation3/src/modules/pickup/items/InvisiblePickup.h

    r7112 r7127  
    4444
    4545namespace orxonox {
    46        
     46
    4747    /**
    4848    @brief
     
    5757    {
    5858        public:
    59        
     59
    6060            InvisiblePickup(BaseObject* creator); //!< Constructor.
    6161            virtual ~InvisiblePickup(); //!< Destructor.
     
    6363            virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
    6464            virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
    65            
     65
    6666            /**
    6767            @brief Checks whether the Pawn is invisible.
     
    7272            inline float getDuration()
    7373                { return this->duration_; }
    74  
     74
    7575        protected:
    7676            bool setInvisible(bool invisibility); //!< Set the Pawn to be invisible or visible again.
     
    7878            void initializeIdentifier(void);
    7979            virtual void pickupTimerCallback(void); //!< Function that gets called when the timer ends.
    80        
     80
    8181        private:
    8282            void initialize(void); //!< Initializes the member variables.
  • code/branches/presentation3/src/modules/pickup/items/MetaPickup.cc

    r6709 r7127  
    4040
    4141namespace orxonox {
    42  
     42
    4343    CreateFactory(MetaPickup);
    44    
     44
    4545    //! Setting the static variables to their values.
    4646    /*static*/ const std::string MetaPickup::metaTypeNone_s = "none";
    4747    /*static*/ const std::string MetaPickup::metaTypeUse_s = "use";
    4848    /*static*/ const std::string MetaPickup::metaTypeDrop_s = "drop";
    49    
     49
    5050    /**
    5151    @brief
     
    5555    {
    5656        RegisterObject(MetaPickup);
    57        
     57
    5858        this->initialize();
    5959    }
    60    
     60
    6161    /**
    6262    @brief
     
    6565    MetaPickup::~MetaPickup()
    6666    {
    67        
    68     }
    69    
     67
     68    }
     69
    7070    /**
    7171    @brief
     
    7575    {
    7676        this->addTarget(ClassIdentifier<PickupCarrier>::getIdentifier());
    77        
     77
    7878        this->setActivationTypeDirect(pickupActivationType::immediate);
    7979        this->setDurationTypeDirect(pickupDurationType::once);
    8080        this->metaType_ = pickupMetaType::none;
    8181    }
    82    
     82
    8383    /**
    8484    @brief
     
    9191        this->pickupIdentifier_->addParameter(type, val);
    9292    }
    93    
     93
    9494    /**
    9595    @brief
     
    9999    {
    100100        SUPER(MetaPickup, XMLPort, xmlelement, mode);
    101        
     101
    102102        XMLPortParam(MetaPickup, "metaType", setMetaType, getMetaType, xmlelement, mode);
    103        
     103
    104104        this->initializeIdentifier();
    105105    }
    106    
     106
    107107    /**
    108108    @brief
     
    113113    {
    114114        SUPER(MetaPickup, changedUsed);
    115        
     115
    116116        //! If the MetaPickup transited to used.
    117117        if(this->isUsed())
     
    144144        }
    145145    }
    146        
     146
    147147    /**
    148148    @brief
     
    155155        if(item == NULL)
    156156            item = new MetaPickup(this);
    157        
     157
    158158        SUPER(MetaPickup, clone, item);
    159        
     159
    160160        MetaPickup* pickup = dynamic_cast<MetaPickup*>(item);
    161161        pickup->setMetaTypeDirect(this->getMetaTypeDirect());
    162        
     162
    163163        pickup->initializeIdentifier();
    164164    }
    165    
     165
    166166    /**
    167167    @brief
     
    184184        }
    185185    }
    186    
     186
    187187    /**
    188188    @brief
     
    206206        }
    207207    }
    208    
     208
    209209}
  • code/branches/presentation3/src/modules/pickup/items/MetaPickup.h

    r6709 r7127  
    5151        };
    5252    }
    53    
     53
    5454    /**
    5555    @brief
     
    6060    class _PickupExport MetaPickup : public Pickup
    6161    {
    62        
     62
    6363        public:
    6464            MetaPickup(BaseObject* creator); //!< Constructor. Registers and initializes the object.
    6565            virtual ~MetaPickup(); //!< Destructor.
    66            
     66
    6767            virtual void XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode); //!< Method for creating a MetaPickup object through XML.
    68            
     68
    6969            virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
    7070            virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
    71            
     71
    7272            /**
    7373            @brief Returns the meta type of the MetaPickup.
     
    7777                { return this->metaType_; }
    7878            const std::string& getMetaType(void); //!< Get the meta type of this MetaPickup.
    79            
     79
    8080        protected:
    8181            void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
    82            
     82
    8383            /**
    8484            @brief Set the meta type of the MetaPickup.
     
    8888                { this->metaType_ =  type; }
    8989            void setMetaType(const std::string& type); //!< Set the meta type of this MetaPickup.
    90            
     90
    9191        private:
    9292            void initialize(void); //!< Initializes the member variables.
    93            
     93
    9494            pickupMetaType::Value metaType_; //!< The meta type of the MetaPickup, determines which actions are taken.
    95            
     95
    9696            //! Static strings for the meta types.
    9797            static const std::string metaTypeNone_s;
    9898            static const std::string metaTypeUse_s;
    9999            static const std::string metaTypeDrop_s;
    100            
    101        
     100
     101
    102102    };
    103103
  • code/branches/presentation3/src/modules/pickup/items/ShieldPickup.cc

    r6998 r7127  
    7979        PickupCarrier* carrier = this->getCarrier();
    8080        Pawn* pawn = dynamic_cast<Pawn*>(carrier);
    81        
     81
    8282        if(pawn == NULL)
    8383        {
     
    8686        return pawn;
    8787    }
    88    
     88
    8989    /**
    9090    @brief
     
    117117        std::string val2 = stream.str();
    118118        this->pickupIdentifier_->addParameter(type2, val2);
    119        
     119
    120120        stream.clear();
    121121        stream << this->getShieldAbsorption();
     
    269269
    270270    void ShieldPickup::pickupTimerCallback(void)
    271     {       
     271    {
    272272        this->setUsed(false);
    273273    }
  • code/branches/presentation3/src/modules/pickup/items/SpeedPickup.cc

    r6755 r7127  
    137137        if(engine == NULL) //!< If the PickupCarrier is no Engine, then this pickup is useless and therefore is destroyed.
    138138            this->destroy();
    139        
     139
    140140        //! If the pickup has transited to used.
    141141        if(this->isUsed())
     
    156156            engine->setSpeedAdd(0.0f);
    157157            engine->setSpeedMultiply(1.0f);
    158            
     158
    159159            if(this->isOnce())
    160160            {
     
    186186            COUT(1) << "Invalid PickupCarrier in SpeedPickup." << std::endl;
    187187        }
    188        
     188
    189189        return engine;
    190190    }
     
    269269
    270270    void SpeedPickup::pickupTimerCallback(void)
    271     {       
     271    {
    272272        this->setUsed(false);
    273273    }
  • code/branches/presentation3/src/modules/pickup/items/SpeedPickup.h

    r6709 r7127  
    7878        protected:
    7979            void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
    80            
     80
    8181            virtual void pickupTimerCallback(void); //!< Function that gets called when timer ends.
    8282
  • code/branches/presentation3/src/modules/questsystem/Quest.h

    r7072 r7127  
    105105            virtual bool fail(PlayerInfo* player); //!< Fails the Quest.
    106106            virtual bool complete(PlayerInfo* player); //!< Completes the Quest.
    107            
     107
    108108            bool addListener(QuestListener* listener); //!< Adds a QuestListener to the list of QuestListeners listening to this Quest.
    109109
  • code/branches/presentation3/src/modules/questsystem/QuestEffectBeacon.cc

    r6945 r7127  
    112112        MultiTriggerContainer* mTrigger = orxonox_cast<MultiTriggerContainer*>(trigger);
    113113        Pawn* pawn = NULL;
    114        
     114
    115115        //! If the trigger is neither a Playertrigger nor a MultiTrigger (i.e. a MultitriggerContainer) we can do anything with it.
    116116        if(pTrigger == NULL && mTrigger == NULL)
    117117            return false;
    118        
    119         // If the trigger is a PlayerTrigger.       
     118
     119        // If the trigger is a PlayerTrigger.
    120120        if(pTrigger != NULL)
    121121        {
     
    125125                pawn = pTrigger->getTriggeringPlayer();
    126126        }
    127        
     127
    128128        // If the trigger is a MultiTrigger (i.e. a MultiTriggerContainer)
    129129        if(mTrigger != NULL)
  • code/branches/presentation3/src/modules/questsystem/QuestItem.cc

    r6945 r7127  
    4242
    4343    CreateUnloadableFactory(QuestItem);
    44    
     44
    4545    /**
    4646    @brief
     
    5050    {
    5151        this->registered_ = false;
    52        
     52
    5353        RegisterObject(QuestItem);
    5454    }
  • code/branches/presentation3/src/modules/questsystem/QuestManager.cc

    r7072 r7127  
    7474    QuestManager::~QuestManager()
    7575    {
    76        
     76
    7777    }
    7878
     
    250250        return numQuests;
    251251    }
    252    
     252
    253253    Quest* QuestManager::getParentQuest(PlayerInfo* player, int index)
    254254    {
     
    272272        return numQuests;
    273273    }
    274    
     274
    275275    Quest* QuestManager::getSubQuest(Quest* quest, PlayerInfo* player, int index)
    276276    {
     
    295295        return numHints;
    296296    }
    297    
     297
    298298    QuestHint* QuestManager::getHints(Quest* quest, PlayerInfo* player, int index)
    299299    {
  • code/branches/presentation3/src/modules/questsystem/QuestNotification.cc

    r6945 r7127  
    3535
    3636    CreateUnloadableFactory(QuestNotification);
    37    
     37
    3838    /**
    3939    @brief
  • code/branches/presentation3/src/modules/questsystem/notifications/Notification.cc

    r6945 r7127  
    4141
    4242    CreateUnloadableFactory(Notification);
    43    
     43
    4444    /**
    4545    @brief
     
    6969    Notification::~Notification()
    7070    {
    71        
     71
    7272    }
    7373
  • code/branches/presentation3/src/modules/questsystem/notifications/NotificationManager.cc

    r6945 r7127  
    6666    NotificationManager::~NotificationManager()
    6767    {
    68        
     68
    6969    }
    7070
     
    227227        int identifier = this->listenerList_.find(listener)->second;
    228228        std::multimap<std::time_t, Notification*>* map = this->notificationLists_.find(identifier)->second;
    229        
     229
    230230        // Make sure all Notifications are removed.
    231231        std::multimap<std::time_t, Notification*>::iterator it = map->begin();
  • code/branches/presentation3/src/modules/questsystem/notifications/NotificationQueue.cc

    r6945 r7127  
    5757    {
    5858        this->registered_ = false;
    59        
     59
    6060        RegisterObject(NotificationQueue);
    6161        this->initialize();
     
    431431        // Unregister the NotificationQueue with the NotificationManager.
    432432        NotificationManager::getInstance().unregisterNotification(container->notification, this);
    433        
     433
    434434        this->removeElement(container->overlay);
    435435        this->containers_.erase(container);
  • code/branches/presentation3/src/modules/weapons/RocketController.cc

    r7021 r7127  
    2828
    2929#include "RocketController.h"
    30 #include "projectiles/SimpleRocket.h" 
     30#include "projectiles/SimpleRocket.h"
    3131#include "util/Math.h"
    3232#include "weapons/projectiles/SimpleRocket.h"
     
    6666            this->moveToTargetPosition();
    6767        }
    68        
    69        
     68
     69
    7070    }
    7171
     
    102102
    103103
    104         if (distance > 1000 && this->rocket_->getVelocity().squaredLength()<160000) 
     104        if (distance > 1000 && this->rocket_->getVelocity().squaredLength()<160000)
    105105            this->rocket_->setAcceleration(this->rocket_->getOrientation()*Vector3(-20,-20,-20));
    106106        if (distance <1000) this->rocket_->setAcceleration(0,0,0);
  • code/branches/presentation3/src/modules/weapons/RocketController.h

    r7039 r7127  
    5050            RocketController(BaseObject* creator);
    5151            virtual ~RocketController();
    52            
     52
    5353            virtual void tick(float dt);
    5454            SimpleRocket* getRocket() const
     
    6464            Vector3 targetPosition_;
    6565            WeakPtr<PlayerInfo> player_;
    66                        
     66
    6767            WeakPtr<WorldEntity> target_;
    6868
  • code/branches/presentation3/src/modules/weapons/projectiles/Rocket.cc

    r7018 r7127  
    167167            this->localAngularVelocity_ = 0;
    168168        }
    169        
     169
    170170        if( GameMode::isMaster() )
    171171        {
    172172            if( this->bDestroy_ )
    173173                this->destroy();
    174            
     174
    175175        }
    176176    }
  • code/branches/presentation3/src/modules/weapons/projectiles/SimpleRocket.cc

    r7025 r7127  
    7171            this->fire_ = new ParticleEmitter(this);
    7272            this->attach(this->fire_);
    73            
     73
    7474            this->fire_->setOrientation(this->getOrientation());
    7575            this->fire_->setSource("Orxonox/simplerocketfire");
     
    9090
    9191
    92    
     92
    9393    /**
    9494    * @brief updates state of rocket, disables fire if no fuel
     
    107107            this->localAngularVelocity_ = 0;
    108108
    109        
     109
    110110            if (this->fuel_)
    111111            {
    112                 if (this->destroyTimer_.getRemainingTime()<  (static_cast<float>(this->FUEL_PERCENTAGE)/100) *this->lifetime_ ) 
     112                if (this->destroyTimer_.getRemainingTime()<  (static_cast<float>(this->FUEL_PERCENTAGE)/100) *this->lifetime_ )
    113113                    this->fuel_=false;
    114114            } else
    115115                this->disableFire();
    116116
    117             if( this->bDestroy_ ) 
     117            if( this->bDestroy_ )
    118118                this->destroy();
    119119        }
    120                
     120
    121121    }
    122122
     
    127127    void SimpleRocket::disableFire()
    128128    {
    129         this->setAcceleration(0,0,0);       
     129        this->setAcceleration(0,0,0);
    130130        this->fire_->detachFromParent();
    131131    }
     
    137137    SimpleRocket::~SimpleRocket()
    138138    {
    139         if (this->isInitialized()) 
     139        if (this->isInitialized())
    140140        {
    141141            if( GameMode::isMaster() )
  • code/branches/presentation3/src/modules/weapons/projectiles/SimpleRocket.h

    r7095 r7127  
    9898            */
    9999            inline void rotatePitch(float value)
    100             {   
     100            {
    101101                this->rotatePitch(Vector2(value, 0)); }
    102102            /**
     
    105105            */
    106106            inline void rotateRoll(float value)
    107             { 
     107            {
    108108                this->rotateRoll(Vector2(value, 0)); }
    109109
     
    124124            Vector3 localAngularVelocity_;
    125125            float damage_;
    126             bool bDestroy_; 
     126            bool bDestroy_;
    127127            bool fuel_; //!< Bool is true while the rocket "has fuel"
    128128
  • code/branches/presentation3/src/modules/weapons/weaponmodes/SimpleRocketFire.cc

    r7095 r7127  
    5454
    5555            this->setMunitionName("TargetSeeking Rockets");
    56             this->setDefaultSoundWithVolume("sounds/Rocket_launch.ogg",0.4); 
     56            this->setDefaultSoundWithVolume("sounds/Rocket_launch.ogg",0.4);
    5757        // The firing sound of the Rocket is played in Rocket.cc (because of OpenAl sound positioning)
    5858    }
  • code/branches/presentation3/src/orxonox/ChatHistory.cc

    r6928 r7127  
    3939  /* constructor */
    4040#ifndef CHATTEST
    41   //ChatHistory::ChatHistory( BaseObject* creator ) : BaseObject(creator) 
    42   ChatHistory::ChatHistory() 
     41  //ChatHistory::ChatHistory( BaseObject* creator ) : BaseObject(creator)
     42  ChatHistory::ChatHistory()
    4343#else
    4444  ChatHistory::ChatHistory()
     
    6868  {
    6969    chat_hist_closelog();
    70    
     70
    7171    /* clear list */
    7272    this->hist_buffer.clear();
     
    7474
    7575  /* react to incoming chat */
    76   void ChatHistory::incomingChat(const std::string& message, 
     76  void ChatHistory::incomingChat(const std::string& message,
    7777    unsigned int senderID)
    7878  {
     
    104104    /* add the line to the log */
    105105    this->chat_hist_logline( text );
    106   } 
     106  }
    107107
    108108  /* Synchronize logfile onto the hard drive */ /* MARK MARK */
     
    128128  /* log a line to a logfile */
    129129  int ChatHistory::chat_hist_logline( const std::string& toadd )
    130   { 
     130  {
    131131    /* output the line to the file if logging is enabled */
    132132    if( this->hist_log_enabled )
     
    138138  int ChatHistory::chat_hist_openlog()
    139139  {
    140     /* TODO: find out the name of the file to log to via settings 
     140    /* TODO: find out the name of the file to log to via settings
    141141     *       and set the this->hist_logfile_path variable to it
    142142     */
     
    167167    /* see if we've actually got a logfile */
    168168    if( this->hist_logfile )
    169     { 
     169    {
    170170      /* yes, we've got one, add a line that shows we're closing it */
    171171      this->chat_hist_logline( "--- Logfile closed ---" );
  • code/branches/presentation3/src/orxonox/ChatHistory.h

    r6928 r7127  
    3434
    3535/* define this if you're unit testing */
    36 //#define CHATTEST 
     36//#define CHATTEST
    3737
    3838#ifndef CHATTEST
     
    6262
    6363#else
    64   class ChatHistory 
     64  class ChatHistory
    6565#endif
    6666  {
     
    7575      virtual ~ChatHistory();
    7676
    77  
     77
    7878    //protected:
    79       /** what to do with incoming chat 
    80        * 
    81        * \param message The incoming message 
     79      /** what to do with incoming chat
     80       *
     81       * \param message The incoming message
    8282       * \param senderID Identification number of the sender
    8383       */
    84       virtual void incomingChat(const std::string& message, 
     84      virtual void incomingChat(const std::string& message,
    8585        unsigned int senderID);
    86      
    87       /** Synchronize logfile onto the hard drive 
     86
     87      /** Synchronize logfile onto the hard drive
    8888       *
    8989       * \return 0 for success, other for error
     
    9393      /** debug-print: output the whole history to stdout */
    9494      void debug_printhist();
    95      
     95
    9696    private:
    9797      /* FIELDS */
  • code/branches/presentation3/src/orxonox/ChatInputHandler.cc

    r7049 r7127  
    4040#include <string>
    4141
    42 namespace orxonox 
     42namespace orxonox
    4343{
    4444  /* singleton */
     
    4848  SetConsoleCommandAlias( ChatInputHandler, activate_static, "startchat",
    4949    true );
    50   SetConsoleCommandAlias( ChatInputHandler, activate_small_static, 
     50  SetConsoleCommandAlias( ChatInputHandler, activate_small_static,
    5151    "startchat_small", true );
    5252
     
    111111
    112112    /* cast it to a listbox */
    113     lb_history = dynamic_cast<CEGUI::Listbox*>(history); 
     113    lb_history = dynamic_cast<CEGUI::Listbox*>(history);
    114114
    115115    /* assert wee */
     
    140140    }
    141141
    142     // blues 
     142    // blues
    143143    red = 0.5, green = 0.5, blue = 1;
    144144    for( ; i < NumberOfColors; ++i )
     
    171171  }
    172172
    173   void ChatInputHandler::deactivate() 
     173  void ChatInputHandler::deactivate()
    174174  {
    175175    /* stop listening */
     
    202202
    203203  /* handle incoming chat */
    204   void ChatInputHandler::incomingChat(const std::string& message, 
     204  void ChatInputHandler::incomingChat(const std::string& message,
    205205    unsigned int senderID)
    206206  {
     
    210210    /* setup player name info */
    211211    if (senderID != CLIENTID_UNKNOWN)
    212     { 
     212    {
    213213       PlayerInfo* player = PlayerManager::getInstance().getClient(senderID);
    214214       if (player)
     
    227227    /* now add */
    228228    this->lb_history->addItem( dynamic_cast<CEGUI::ListboxItem*>(toadd) );
    229     this->lb_history->ensureItemIsVisible( 
     229    this->lb_history->ensureItemIsVisible(
    230230      dynamic_cast<CEGUI::ListboxItem*>(toadd) );
    231231
    232232    /* make sure the history handles it */
    233233    this->lb_history->handleUpdatedItemData();
    234   } 
     234  }
    235235
    236236
    237237  /* sub for inputchanged */
    238   void ChatInputHandler::sub_adjust_dispoffset( int maxlen, 
    239     int cursorpos, 
     238  void ChatInputHandler::sub_adjust_dispoffset( int maxlen,
     239    int cursorpos,
    240240    int inplen )
    241241  {
    242242    /* already start offsetting 5 characters before end */
    243243    if( cursorpos+5 > maxlen )
    244     { 
     244    {
    245245      /* always stay 5 characters ahead of end, looks better */
    246246      ((disp_offset = cursorpos-maxlen+5) >= 0) ? 1 : disp_offset = 0;
     
    249249      (disp_offset > cursorpos ) ? disp_offset = 0 : 1;
    250250    }
    251      
     251
    252252    /* make sure we don't die at substr */
    253253    if( inplen <= disp_offset ) disp_offset = 0;
     
    260260    std::string raw = this->inpbuf->get();
    261261    int cursorpos = this->inpbuf->getCursorPosition();
    262    
     262
    263263    /* get string before cursor */
    264264    std::string left = raw.substr( 0, cursorpos );
     
    268268    if( raw.length() >= left.length()+1 )
    269269      right = raw.substr( cursorpos );
    270      
     270
    271271    /* set the text */
    272272    std::string assembled = "$ " + left + "|" + right;
    273273
    274274    if( this->fullchat )
    275     { 
     275    {
    276276      /* adjust curser position - magic number 5 for font width */
    277       sub_adjust_dispoffset( (this->input->getUnclippedInnerRect().getWidth()/6), 
     277      sub_adjust_dispoffset( (this->input->getUnclippedInnerRect().getWidth()/6),
    278278        cursorpos, assembled.length() );
    279279      this->input->setProperty( "Text", assembled.substr( disp_offset ) );
     
    282282    {
    283283      /* adjust curser position - magic number 5 for font width */
    284       sub_adjust_dispoffset( (this->inputonly->getUnclippedInnerRect().getWidth()/6), 
     284      sub_adjust_dispoffset( (this->inputonly->getUnclippedInnerRect().getWidth()/6),
    285285        cursorpos, assembled.length() );
    286286      this->inputonly->setProperty( "Text", assembled.substr( disp_offset) );
     
    323323  void ChatInputHandler::cursorRight()
    324324  { this->inpbuf->increaseCursor(); }
    325  
     325
    326326  void ChatInputHandler::cursorLeft()
    327327  { this->inpbuf->decreaseCursor(); }
    328  
     328
    329329  void ChatInputHandler::cursorEnd()
    330330  { this->inpbuf->setCursorToEnd(); }
  • code/branches/presentation3/src/orxonox/ChatInputHandler.h

    r7043 r7127  
    6262    private:
    6363      /** Input buffer, to be used to catch input from the
    64        * keyboard 
     64       * keyboard
    6565       */
    6666      InputBuffer *inpbuf;
     
    126126       * history window of the full chat window)
    127127       */
    128       void incomingChat( const std::string& message, 
     128      void incomingChat( const std::string& message,
    129129        unsigned int senderID );
    130130
    131131      /** \param full true means show full chat window with history,
    132132            false means show only an input line
    133        * 
    134        * Show the chat window and redirect the game's keyboard input 
     133       *
     134       * Show the chat window and redirect the game's keyboard input
    135135       * into it.
    136136       */
  • code/branches/presentation3/src/orxonox/Level.cc

    r7105 r7127  
    4949        RegisterObject(Level);
    5050
    51        
     51
    5252        this->registerVariables();
    5353        this->xmlfilename_ = this->getFilename();
     
    7373        XMLPortParam(Level, "description", setDescription, getDescription, xmlelement, mode);
    7474        XMLPortParam(Level, "gametype", setGametypeString, getGametypeString, xmlelement, mode).defaultValues("Gametype");
    75            
     75
    7676        XMLPortObject(Level, MeshLodInformation, "lodinformation", addLodInfo, getLodInfo, xmlelement, mode);
    7777        XMLPortObjectExtended(Level, BaseObject, "", addObject, getObject, xmlelement, mode, true, false);
     
    9999        Loader::open(this->xmlfile_);
    100100    }
    101    
     101
    102102    void Level::networkCallbackTemplatesChanged()
    103103    {
     
    151151        return 0;
    152152    }
    153    
     153
    154154    void Level::addLodInfo(MeshLodInformation* lodInformation)
    155155    {
     
    165165        if(this->lodInformation_.find(meshName)!=this->lodInformation_.end())
    166166            return this->lodInformation_.find(meshName)->second;
    167        
     167
    168168        return 0;
    169169    }
  • code/branches/presentation3/src/orxonox/MoodManager.cc

    r7121 r7127  
    4545        RegisterRootObject(MoodManager);
    4646        this->setConfigValues();
    47        
     47
    4848        // Checking for the existence of the folder for the default mood
    4949        /* Note: Currently Resource::exists(path) will always return false when the path field points to a folder.
  • code/branches/presentation3/src/orxonox/OrxonoxPrereqs.h

    r7034 r7127  
    137137    class OrxonoxOverlay;
    138138    class OverlayGroup;
    139    
     139
    140140    // pickup
    141141    class PickupIdentifier;
  • code/branches/presentation3/src/orxonox/Radar.cc

    r6942 r7127  
    8787        }
    8888    }
    89    
     89
    9090    void Radar::removeRadarObject(RadarViewable* rv)
    9191    {
     
    203203        }
    204204    }
    205    
     205
    206206    void Radar::radarObjectChanged(RadarViewable* rv)
    207207    {
  • code/branches/presentation3/src/orxonox/controllers/AIController.cc

    r7090 r7127  
    112112            random = rnd(maxrand);
    113113            if (random < 25 && (this->bShooting_))
    114                 this->bShooting_ = false; 
     114                this->bShooting_ = false;
    115115
    116116        }
     
    127127            this->commandSlaves();
    128128
    129             if  (this->specificMasterAction_ != NONE) 
     129            if  (this->specificMasterAction_ != NONE)
    130130                    this->specificMasterActionHold();
    131131
     
    149149                 // lose master status (only if less than 4 slaves in formation)
    150150                random = rnd(maxrand);
    151                 if(random < 15/(this->slaves_.size()+1) && this->slaves_.size() < 4 ) 
     151                if(random < 15/(this->slaves_.size()+1) && this->slaves_.size() < 4 )
    152152                   this->loseMasterState();
    153153
  • code/branches/presentation3/src/orxonox/controllers/ArtificialController.cc

    r7107 r7127  
    9191        {
    9292            this->removeFromFormation();
    93            
     93
    9494            for (ObjectList<ArtificialController>::iterator it = ObjectList<ArtificialController>::begin(); it; ++it)
    9595            {
     
    101101                        it->myMaster_ = 0;
    102102                    }
    103                    
     103
    104104                    while (true)
    105105                    {
     
    139139        {
    140140            Controller* controller = 0;
    141            
     141
    142142            if (it->getController())
    143143                controller = it->getController();
    144144            else if (it->getXMLController())
    145145                controller = it->getXMLController();
    146                
     146
    147147            if (!controller)
    148148                continue;
     
    162162
    163163    /**
    164         @brief Get all masters to do a "specific master action" 
     164        @brief Get all masters to do a "specific master action"
    165165        @param action which action to perform (integer, so it can be called with a console command (tmp solution))
    166166    */
     
    170170        {
    171171            Controller* controller = 0;
    172            
     172
    173173            if (it->getController())
    174174                controller = it->getController();
    175175            else if (it->getXMLController())
    176176                controller = it->getXMLController();
    177                
     177
    178178            if (!controller)
    179179                continue;
     
    204204        {
    205205            Controller* controller = 0;
    206            
     206
    207207            if (it->getController())
    208208                controller = it->getController();
    209209            else if (it->getXMLController())
    210210                controller = it->getXMLController();
    211                
     211
    212212            if (!controller)
    213213                continue;
     
    252252        {
    253253            Controller* controller = 0;
    254            
     254
    255255            if (it->getController())
    256256                controller = it->getController();
    257257            else if (it->getXMLController())
    258258                controller = it->getXMLController();
    259                
     259
    260260            if (!controller)
    261261                continue;
     
    280280        {
    281281            Controller* controller = 0;
    282            
     282
    283283            if (it->getController())
    284284                controller = it->getController();
    285285            else if (it->getXMLController())
    286286                controller = it->getXMLController();
    287                
     287
    288288            if (!controller)
    289289                continue;
     
    303303    void ArtificialController::changedControllableEntity()
    304304    {
    305         if (!this->getControllableEntity()) 
     305        if (!this->getControllableEntity())
    306306            this->removeFromFormation();
    307307    }
     
    400400                this->myMaster_->slaves_.erase(it);
    401401        }
    402        
     402
    403403        this->myMaster_ = 0;
    404404        this->state_ = FREE;
     
    423423            //has it an ArtificialController?
    424424            Controller* controller = 0;
    425            
     425
    426426            if (it->getController())
    427427                controller = it->getController();
    428428            else if (it->getXMLController())
    429429                controller = it->getXMLController();
    430                
     430
    431431            if (!controller)
    432432                continue;
     
    476476        @brief Commands the slaves of a master into a formation. Sufficiently fast not to be called within tick. Initiated by a master.
    477477    */
    478     void ArtificialController::commandSlaves() 
     478    void ArtificialController::commandSlaves()
    479479    {
    480480        if(this->state_ != MASTER) return;
     
    489489            this->slaves_.front()->setTargetPosition(dest);
    490490        }
    491         else 
     491        else
    492492        {
    493493            dest += 1.0f*orient*WorldEntity::BACK;
     
    592592    bool ArtificialController::forcedFree()
    593593    {
    594         if(this->freedomCount_ > 0) 
     594        if(this->freedomCount_ > 0)
    595595        {
    596596            this->freedomCount_--;
     
    606606        if(this->state_ != MASTER) return;
    607607
    608         if (specificMasterActionHoldCount_ == 0) 
     608        if (specificMasterActionHoldCount_ == 0)
    609609         {
    610610            this->specificMasterAction_ = NONE;
     
    677677        if (!always)
    678678            this->specificMasterActionHoldCount_ = secondsToFollow;
    679         else 
     679        else
    680680            this->specificMasterActionHoldCount_ = INT_MAX; //for now...
    681681
     
    698698
    699699            currentHumanController = orxonox_cast<NewHumanController*>(it->getController());
    700             if(currentHumanController) 
     700            if(currentHumanController)
    701701            {
    702702                if (!ArtificialController::sameTeam(this->getControllableEntity(), *it, this->getGametype())) continue;
  • code/branches/presentation3/src/orxonox/controllers/ArtificialController.h

    r7107 r7127  
    6464            inline int getFormationSize() const
    6565                { return this->maxFormationSize_; }
    66                
     66
    6767            inline void setPassive(bool passive)
    6868                { this->passive_ = passive; }
  • code/branches/presentation3/src/orxonox/controllers/DroneController.h

    r7034 r7127  
    5252            DroneController(BaseObject* creator);
    5353            virtual ~DroneController();
    54            
     54
    5555            virtual void tick(float dt); //!< The controlling happens here. This method defines what the controller has to do each tick.
    5656
  • code/branches/presentation3/src/orxonox/gametypes/Gametype.cc

    r6996 r7127  
    330330                if (index == randomspawn)
    331331                    return (*it);
    332                
     332
    333333                ++index;
    334334            }
  • code/branches/presentation3/src/orxonox/graphics/MeshLodInformation.cc

    r7039 r7127  
    4040    CreateFactory(MeshLodInformation);
    4141
    42     MeshLodInformation::MeshLodInformation(BaseObject* creator) 
     42    MeshLodInformation::MeshLodInformation(BaseObject* creator)
    4343    : BaseObject(creator), lodLevel_(5), bEnabled_(true), numLevels_(10), reductionRate_(0.15)
    4444    {
     
    5959        XMLPortParam(MeshLodInformation, "reductionRate", setReductionRate, getReductionRate, xmlelement, mode);
    6060    }
    61    
     61
    6262    std::string MeshLodInformation::getMeshName()
    6363    {
    6464        return MeshLodInformation::getMeshSource();
    6565    }
    66    
     66
    6767    void MeshLodInformation::setLodLevel(float lodLevel)
    6868    {
     
    7373    {
    7474        return lodLevel_;
    75     } 
     75    }
    7676    void MeshLodInformation::setMeshSource(std::string meshSource)
    7777    {
     
    8282        return meshSource_;
    8383    }
    84  
     84
    8585}
  • code/branches/presentation3/src/orxonox/graphics/MeshLodInformation.h

    r7036 r7127  
    4343            MeshLodInformation(BaseObject* creator);
    4444            virtual ~MeshLodInformation();
    45            
     45
    4646            float getLodLevel();
    4747            std::string getMeshName();
     
    4949            unsigned int getNumLevels(){ return this->numLevels_; }
    5050            float getReductionRate(){ return this->reductionRate_; }
    51            
     51
    5252            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    5353
  • code/branches/presentation3/src/orxonox/graphics/Model.cc

    r7111 r7127  
    4242    CreateFactory(Model);
    4343
    44     Model::Model(BaseObject* creator) : 
     44    Model::Model(BaseObject* creator) :
    4545        StaticEntity(creator), bCastShadows_(true), lodLevel_(5), bLodEnabled_(true), numLodLevels_(10), lodReductionRate_(.15)
    4646    {
     
    5959    {
    6060        SUPER(Model, XMLPort, xmlelement, mode);
    61        
     61
    6262        XMLPortParam(Model, "lodLevel", setLodLevel, getLodLevel, xmlelement, mode);
    63        
     63
    6464        XMLPortParam(Model, "mesh", setMeshSource, getMeshSource, xmlelement, mode);
    6565        XMLPortParam(Model, "shadow", setCastShadows, getCastShadows, xmlelement, mode).defaultValues(true);
     
    8181        return scaleFactor;
    8282    }
    83    
     83
    8484    void Model::changedMesh()
    8585    {
     
    8888            if (this->mesh_.getEntity())
    8989                this->detachOgreObject(this->mesh_.getEntity());
    90            
     90
    9191            this->mesh_.setMeshSource(this->getScene()->getSceneManager(), this->meshSrc_);
    9292
     
    9696                this->mesh_.getEntity()->setCastShadows(this->bCastShadows_);
    9797                this->mesh_.setVisible(this->isVisible());
    98                
    99                
     98
     99
    100100                //LOD
    101101                if( this->mesh_.getEntity()->getMesh()->getNumLodLevels()==1 )
    102102                {
    103103                    Level* level = this->getLevel();
    104                  
     104
    105105                    assert( level != 0 );
    106                    
     106
    107107                    MeshLodInformation* lodInfo = level->getLodInfo(this->meshSrc_);
    108108                    if( lodInfo )
     
    122122                        float volume = this->mesh_.getEntity()->getBoundingBox().volume();
    123123    //                     float scaleFactor = 1;
    124                        
     124
    125125    //                     BaseObject* creatorPtr = this;
    126     //                     
     126    //
    127127    //                     while(creatorPtr!=NULL&&orxonox_cast<WorldEntity*>(creatorPtr))
    128128    //                     {
     
    131131    //                     }
    132132    //                     COUT(0) << "name: " << this->meshSrc_ << "scaleFactor: " << scaleFactor << ", volume: " << volume << endl;
    133                        
     133
    134134                        COUT(4) << "Setting lodLevel for " << this->meshSrc_<< " with lodLevel_: " << this->lodLevel_ <<" and volume: "<< volume << ":" << std::endl;
    135135
     
    144144    //                         float factor = scaleFactor*5/lodLevel_;
    145145                            float factor = pow(volume, 2.0f / 3.0f) * 15.0f / lodLevel_;
    146                            
     146
    147147                            COUT(4) << "LodLevel set with factor: " << factor << endl;
    148148
     
    160160                                distList.pop_back();
    161161
    162                            
     162
    163163                            //Generiert LOD-Levels
    164164                            this->mesh_.getEntity()->getMesh()->generateLodLevels(distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL, this->lodReductionRate_);
     
    171171                            else
    172172                                what = "<0";
    173                            
     173
    174174                            COUT(4)<<"LodLevel not set because lodLevel("<<lodLevel_<<") was "<<what<<"." << endl;
    175175                        }
  • code/branches/presentation3/src/orxonox/graphics/Model.h

    r7036 r7127  
    6161            inline bool getCastShadows() const
    6262                { return this->bCastShadows_; }
    63                
     63
    6464        protected:
    6565            void changedMesh();
    6666            void changedShadows();
    67            
     67
    6868            //LoD
    6969            inline void setLodLevel(float lodLevel)
     
    7676            Mesh mesh_;
    7777            bool bCastShadows_;
    78            
     78
    7979            //LoD
    8080            float lodLevel_;
     
    8282            unsigned int numLodLevels_;
    8383            float lodReductionRate_;
    84            
     84
    8585    };
    8686}
  • code/branches/presentation3/src/orxonox/infos/GametypeInfo.cc

    r7062 r7127  
    157157            it->staticmessage(this, message, colour);
    158158    }
    159    
     159
    160160     void GametypeInfo::dispatchFadingMessage(const std::string& message)
    161161    {
  • code/branches/presentation3/src/orxonox/interfaces/InterfaceCompilation.cc

    r7096 r7127  
    5252        RegisterRootObject(GametypeMessageListener);
    5353    }
    54    
     54
    5555    //----------------------------
    5656    // PickupCarrier
     
    5959    {
    6060        RegisterRootObject(PickupCarrier);
    61        
     61
    6262        this->setCarrierName("PickupCarrier");
    6363    }
    64    
     64
    6565    PickupCarrier::~PickupCarrier()
    6666    {
     
    8585        this->isForPlayer_ = true;
    8686    }
    87    
     87
    8888    //----------------------------
    8989    // RadarListener
  • code/branches/presentation3/src/orxonox/interfaces/PickupCarrier.h

    r7034 r7127  
    6868        friend class Pickupable;
    6969        friend class PickupManager;
    70         //! Friends. 
     70        //! Friends.
    7171        friend class Pickup;
    7272        friend class HealthPickup;
     
    170170            */
    171171            virtual const Vector3& getCarrierPosition(void) = 0;
    172            
     172
    173173            /**
    174174            @brief Get the name of this PickupCarrier.
     
    176176            */
    177177            const std::string& getCarrierName(void) { return this->carrierName_; } // tolua_export
    178            
    179         protected:       
     178
     179        protected:
    180180            /**
    181181            @brief Get all direct children of this PickupSpawner.
     
    198198            std::set<Pickupable*>& getPickups(void)
    199199                { return this->pickups_; }
    200                
     200
    201201            /**
    202202            @brief Set the name of this PickupCarrier.
     
    206206            void setCarrierName(const std::string& name)
    207207                { this->carrierName_ = name; }
    208        
     208
    209209        private:
    210210            std::set<Pickupable*> pickups_; //!< The list of Pickupables carried by this PickupCarrier.
    211211            std::string carrierName_; //!< The name of the PickupCarrier, as displayed in the PickupInventory.
    212            
     212
    213213            /**
    214214            @brief Get the number of carrier children this PickupCarrier has.
     
    222222                    return size;
    223223                }
    224            
     224
    225225            /**
    226226            @brief Get the index-th child of this PickupCarrier.
     
    237237                    return carrier;
    238238                }
    239            
     239
    240240            /**
    241241            @brief Get the number of Pickupables this PickupCarrier carries.
     
    244244            unsigned int getNumPickups(void)
    245245                { return this->pickups_.size(); }
    246            
     246
    247247            /**
    248248            @brief Get the index-th Pickupable of this PickupCarrier.
     
    259259                    return *it;
    260260                }
    261            
     261
    262262    };
    263263}
  • code/branches/presentation3/src/orxonox/interfaces/Pickupable.cc

    r7094 r7127  
    4646namespace orxonox
    4747{
    48    
     48
    4949    /**
    5050    @brief
     
    5252    */
    5353    Pickupable::Pickupable() : pickupIdentifier_(NULL), used_(false), pickedUp_(false)
    54     {       
     54    {
    5555        RegisterRootObject(Pickupable);
    56        
     56
    5757        this->carrier_ = NULL;
    58        
     58
    5959        this->pickupIdentifier_ = new PickupIdentifier(this);
    6060    }
    61    
    62     /**
    63     @brief
    64         Destructor. 
     61
     62    /**
     63    @brief
     64        Destructor.
    6565    */
    6666    Pickupable::~Pickupable()
     
    6868        if(this->isUsed())
    6969            this->setUsed(false);
    70        
     70
    7171        if(this->isPickedUp() && this->getCarrier() != NULL)
    7272        {
     
    7474            this->setCarrier(NULL);
    7575        }
    76        
     76
    7777        if(this->pickupIdentifier_ != NULL)
    7878            this->pickupIdentifier_->destroy();
    7979    }
    80    
     80
    8181    /**
    8282    @brief
     
    9191        if(this->used_ == used)
    9292            return false;
    93        
     93
    9494        COUT(4) << "Pickupable (&" << this << ") set to used " << used << "." << std::endl;
    95        
     95
    9696        this->used_ = used;
    9797        this->changedUsed();
     
    100100        return true;
    101101    }
    102    
     102
    103103    /**
    104104    @brief
     
    115115        return this->isTarget(carrier->getIdentifier());
    116116    }
    117    
     117
    118118    /**
    119119    @brief
     
    134134        return false;
    135135    }
    136        
     136
    137137    /**
    138138    @brief
     
    147147        return this->addTarget(target->getIdentifier());
    148148    }
    149    
     149
    150150    /**
    151151    @brief
     
    160160        if(this->isTarget(target)) //!< If the input target is already present in the list of targets.
    161161            return false;
    162        
     162
    163163        COUT(4) << "Target " << target->getName() << " added to Pickupable (&" << this << ")." << std::endl;
    164164        this->targets_.push_back(target);
    165165        return true;
    166166    }
    167    
    168     /**
    169     @brief 
     167
     168    /**
     169    @brief
    170170        Sets the Pickupable to picked up.
    171171        This method will be called by the PickupCarrier picking the Pickupable up.
     
    179179        if(this->isPickedUp()) //!< If the Pickupable is already picked up.
    180180            return false;
    181        
     181
    182182        COUT(4) << "Pickupable (&" << this << ") got picked up by a PickupCarrier (&" << carrier << ")." << std::endl;
    183183        this->setCarrier(carrier);
     
    185185        return true;
    186186    }
    187    
     187
    188188    /**
    189189    @brief
     
    198198        if(this->pickedUp_ == pickedUp)
    199199            return false;
    200        
     200
    201201        COUT(4) << "Pickupable (&" << this << ") set to pickedUp " << pickedUp << "." << std::endl;
    202        
     202
    203203        this->pickedUp_ = pickedUp;
    204204        this->changedPickedUp();
     
    206206        return true;
    207207    }
    208        
     208
    209209    /**
    210210    @brief
     
    217217        if(this->carrier_ == carrier)
    218218            return false;
    219        
     219
    220220        COUT(4) << "Pickupable (&" << this << ") changed Carrier (& " << carrier << ")." << std::endl;
    221        
     221
    222222        this->carrier_ = carrier;
    223223        this->changedCarrier();
     
    226226        return true;
    227227    }
    228    
    229     /**
    230     @brief 
     228
     229    /**
     230    @brief
    231231        Sets the Pickupable to not picked up or dropped.
    232232        This method will be called by the PickupCarrier dropping the Pickupable.
     
    238238        if(!this->isPickedUp()) //!< If the Pickupable is not picked up.
    239239            return false;
    240        
     240
    241241        COUT(4) << "Pickupable (&" << this << ") got dropped up by a PickupCarrier (&" << this->getCarrier() << ")." << std::endl;
    242242        this->setUsed(false);
    243243        this->setPickedUp(false);
    244        
     244
    245245        bool created = this->createSpawner();
    246        
     246
    247247        this->setCarrier(NULL);
    248        
     248
    249249        if(!created)
    250250        {
    251251            this->destroy();
    252252        }
    253        
    254         return true;
    255     }
    256    
     253
     254        return true;
     255    }
     256
    257257    /**
    258258    @brief
     
    265265        OrxonoxClass* item = NULL;
    266266        this->clone(item);
    267        
     267
    268268        Pickupable* pickup = dynamic_cast<Pickupable*>(item);
    269        
     269
    270270        COUT(4) << "Pickupable (&" << this << ") cloned. Clone is new Pickupable (&" << pickup << ")." << std::endl;
    271271        return pickup;
    272272    }
    273    
     273
    274274    /**
    275275    @brief
     
    299299        return carrier->pickup(this);
    300300    }
    301    
     301
    302302}
  • code/branches/presentation3/src/orxonox/interfaces/Pickupable.h

    r7094 r7127  
    4545namespace orxonox // tolua_export
    4646{ // tolua_export
    47    
     47
    4848    /**
    4949    @brief
     
    5757        protected:
    5858            Pickupable(); //!< Default constructor.
    59        
     59
    6060        public:
    6161            virtual ~Pickupable(); //!< Default destructor.
    62            
     62
    6363            /**
    6464            @brief Get whether the pickup is currently in use or not.
     
    7171            */
    7272            virtual void changedUsed(void) {}
    73            
     73
    7474            /**
    7575            @brief Get the carrier of the pickup.
     
    8383            */
    8484            virtual void changedCarrier(void) {}
    85            
     85
    8686            /**
    8787            @brief Returns whether the Pickupable is currently picked up.
     
    9494            */
    9595            virtual void changedPickedUp(void) {}
    96            
     96
    9797            bool pickedUp(PickupCarrier* carrier); //!< Sets the Pickupable to picked up.
    9898            bool dropped(void); //!< Sets the Pickupable to not picked up or dropped.
    99            
     99
    100100            virtual bool isTarget(PickupCarrier* carrier) const; //!< Get whether the given PickupCarrier is a target of this pickup.
    101101            bool isTarget(const Identifier* identifier) const; //!< Get whether a given class, represented by the input Identifier, is a target of this Pickupable.
    102102            bool addTarget(PickupCarrier* target); //!< Add a PickupCarrier as target of this pickup.
    103103            bool addTarget(Identifier* identifier); //!< Add a class, representetd by the input Identifier, as target of this pickup.
    104            
     104
    105105            Pickupable* clone(void); //!< Creates a duplicate of the Pickupable.
    106106            virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
    107            
     107
    108108            /**
    109109            @brief Get the PickupIdentifier of this Pickupable.
     
    112112            virtual const PickupIdentifier* getPickupIdentifier(void)
    113113                { return this->pickupIdentifier_; }
    114                
     114
    115115            bool setUsed(bool used); //!< Sets the Pickupable to used or unused, depending on the input.
    116116            bool setPickedUp(bool pickedUp); //!< Helper method to set the Pickupable to either picked up or not picked up.
    117117            bool setCarrier(PickupCarrier* carrier, bool tell = false); //!< Sets the carrier of the pickup.
    118            
     118
    119119        protected:
    120120            /**
     
    122122            */
    123123            void initializeIdentifier(void) {}
    124            
     124
    125125            /**
    126126            @brief Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
     
    131131            */
    132132            virtual bool createSpawner(void) = 0;
    133            
     133
    134134            PickupIdentifier* pickupIdentifier_; //!< The PickupIdentifier of this Pickupable.
    135            
     135
    136136        private:
    137            
     137
    138138            bool used_; //!< Whether the pickup is currently in use or not.
    139139            bool pickedUp_; //!< Whether the pickup is currently picked up or not.
    140            
     140
    141141            PickupCarrier* carrier_; //!< The carrier of the pickup.
    142142            std::list<Identifier*> targets_; //!< The possible targets of this pickup.
     
    147147
    148148    };  // tolua_export
    149    
     149
    150150    SUPER_FUNCTION(10, Pickupable, changedUsed, false);
    151151    SUPER_FUNCTION(12, Pickupable, changedCarrier, false);
  • code/branches/presentation3/src/orxonox/interfaces/RadarViewable.cc

    r7045 r7127  
    6565    RadarViewable::~RadarViewable()
    6666    {
    67        
     67
    6868        if( this->bInitialized_ )
    6969        {
     
    109109        }
    110110    }
    111    
     111
    112112    void RadarViewable::settingsChanged()
    113113    {
  • code/branches/presentation3/src/orxonox/interfaces/RadarViewable.h

    r7045 r7127  
    8888
    8989        inline void setRadarVisibility(bool b)
    90             { 
     90            {
    9191                if(b!=this->bVisibility_)
    9292                {
  • code/branches/presentation3/src/orxonox/pickup/PickupIdentifier.cc

    r6725 r7127  
    3939namespace orxonox
    4040{
    41    
     41
    4242    /**
    4343    @brief
     
    4747    {
    4848        RegisterRootObject(PickupIdentifier);
    49        
     49
    5050        if(pickup == NULL)
    5151            COUT(1) << "Error, PickupIdentifier was created without a valid Pickupable." << std::endl;
    52        
     52
    5353        this->pickup_ = pickup;
    5454    }
    55    
     55
    5656    PickupIdentifier::~PickupIdentifier()
    5757    {
    5858
    5959    }
    60    
     60
    6161    /**
    6262    @brief
     
    7474            COUT(1) << "Error in PickupIdentifier::compare: Input Identifier is NULL." << std::endl;
    7575        }
    76        
     76
    7777        if(identifier->pickup_ == NULL && this->pickup_ == NULL)
    7878        {
     
    8080            COUT(1) << "Error in PickupIdentifier::compare: Pickup stored by Identifier is NULL." << std::endl;
    8181        }
    82        
     82
    8383        if(identifier->pickup_ == NULL)
    8484        {
     
    8686            COUT(1) << "Error in PickupIdentifier::compare: Pickup stored by Identifier is NULL." << std::endl;
    8787        }
    88        
     88
    8989        if(this->pickup_ == NULL)
    9090        {
     
    9292            COUT(1) << "Error in PickupIdentifier::compare: Pickup stored by Identifier is NULL." << std::endl;
    9393        }
    94        
     94
    9595        //! If the classIdentifiers are not the same (meaning the PickupIdentifiers identify different classes), the obviously the two Pickupables identified by the PickupIdentifiers cannot be the same. An ordering is established through the alphabetical ordering of the respective classnames.
    9696        if(!identifier->pickup_->getIdentifier()->isExactlyA(this->pickup_->getIdentifier()))
    9797            return this->pickup_->getIdentifier()->getName().compare(identifier->pickup_->getIdentifier()->getName());
    98        
     98
    9999        //! If the class is the same for both PickupIdentifiers we go on to check the parameters of the class.
    100100        //! If the two have a different number of parameters then obviusly something is very wrong.
     
    104104            return this->parameters_.size()-identifier->parameters_.size();
    105105        }
    106        
     106
    107107        //! We iterate through all parameters and compar their values (which are strings). The first parameter is the most significant. The ordering is once again established by the alphabetical comparison of the two value strings.
    108108        for(std::map<std::string, std::string>::const_iterator it = this->parameters_.begin(); it != this->parameters_.end(); it++)
     
    117117                return it->second.compare(identifier->parameters_.find(it->first)->second);
    118118        }
    119            
     119
    120120        return 0;
    121121    }
    122    
     122
    123123    /**
    124124    @brief
     
    134134    {
    135135        COUT(4) << "PickupIdentifier " << name << ", " << value << std::endl;
    136        
     136
    137137        if(!(this->parameters_.find(name) == this->parameters_.end()))
    138138        {
     
    140140            return false;
    141141        }
    142        
     142
    143143        this->parameters_[name] = value;
    144        
     144
    145145        return true;
    146146    }
    147    
     147
    148148}
  • code/branches/presentation3/src/orxonox/pickup/PickupIdentifier.h

    r6540 r7127  
    4141#include "core/Identifier.h"
    4242
    43 #include "core/OrxonoxClass.h" 
     43#include "core/OrxonoxClass.h"
    4444
    4545namespace orxonox
    4646{
    47    
     47
    4848    /**
    4949    @brief
     
    5757    class _OrxonoxExport PickupIdentifier : virtual public OrxonoxClass
    5858    {
    59        
     59
    6060        public:
    6161            PickupIdentifier(Pickupable* pickup); //!< Constructor.
    6262            ~PickupIdentifier(); //!< Destructor.
    63            
     63
    6464            virtual int compare(const PickupIdentifier* identifier) const; //!< Compares two PickupIdentifiers and returns 0 if a == b, <0 if a < b and >0 if a > b for a.compare(b).
    65            
     65
    6666            bool addParameter(std::string & name, std::string & value); //!< Add a parameter to the PickupIdentifier.
    67            
     67
    6868        private:
    6969            Pickupable* pickup_; //!< The Pickupable the PickupIdentififer is for.
    7070            std::map<std::string, std::string> parameters_; //!< The parameters identifying the type of the pickup beyond the class.
    71            
     71
    7272    };
    73    
     73
    7474    /**
    7575    @brief
     
    8181            { return lhs->compare(rhs) < 0; }
    8282    };
    83    
     83
    8484}
    8585
  • code/branches/presentation3/src/orxonox/worldentities/Drone.h

    r7060 r7127  
    5353            virtual void tick(float dt); //!< Defines which actions the Drone has to take in each tick.
    5454
    55            
     55
    5656            virtual void moveFrontBack(const Vector2& value);
    5757            virtual void moveRightLeft(const Vector2& value);
     
    6161            virtual void rotatePitch(const Vector2& value);
    6262            virtual void rotateRoll(const Vector2& value);
    63            
     63
    6464            /**
    6565            @brief Moves the Drone in the Front/Back-direction by the specifed amount.
     
    8080            inline void moveUpDown(float value)
    8181            { this->moveUpDown(Vector2(value, 0)); }
    82            
     82
    8383            /**
    8484            @brief Rotates the Drone around the y-axis by the specifed amount.
     
    9999            inline void rotateRoll(float value)
    100100            { this->rotateRoll(Vector2(value, 0)); }
    101            
     101
    102102            /**
    103103            @brief Sets the primary thrust to the input amount.
     
    105105            */
    106106            inline void setPrimaryThrust( float thrust )
    107                 { this->primaryThrust_=thrust; }     
     107                { this->primaryThrust_=thrust; }
    108108            inline void setAuxilaryThrust( float thrust )
    109                 { this->auxilaryThrust_=thrust; }     
     109                { this->auxilaryThrust_=thrust; }
    110110            inline void setRotationThrust( float thrust )
    111                 { this->rotationThrust_=thrust; }     
     111                { this->rotationThrust_=thrust; }
    112112            inline void setMaxDistanceToOwner( float distance)
    113113                { this->maxDistanceToOwner_=distance; }
     
    117117                { this->maxShootingRange_=distance; }
    118118
    119            
     119
    120120            /**
    121121            @brief Gets the primary thrust to the input amount.
     
    134134            inline float getMaxShootingRange()
    135135                { return this->maxShootingRange_; }
    136            
     136
    137137        private:
    138138            DroneController *myController_; //!< The controller of the Drone.
    139            
     139
    140140            btVector3 localLinearAcceleration_; //!< The linear acceleration that is used to move the Drone the next tick.
    141141            btVector3 localAngularAcceleration_; //!< The linear angular acceleration that is used to move the Drone the next tick.
    142             float primaryThrust_; //!< The amount of primary thrust. This is just used, when moving forward. 
     142            float primaryThrust_; //!< The amount of primary thrust. This is just used, when moving forward.
    143143            float auxilaryThrust_; //!< The amount of auxilary thrust. Used for all other movements (except for rotations).
    144144            float rotationThrust_; //!< The amount of rotation thrust. Used for rotations only.
  • code/branches/presentation3/src/orxonox/worldentities/WorldEntity.cc

    r6524 r7127  
    8181        this->node_->setPosition(Vector3::ZERO);
    8282        this->node_->setOrientation(Quaternion::IDENTITY);
    83        
     83
    8484        // Activity and visibility memory.
    8585        this->bActiveMem_ = true;
     
    205205        registerVariable(this->parentID_,       VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::networkcallback_parentChanged));
    206206    }
    207    
     207
    208208    /**
    209209    @brief
     
    213213    {
    214214        SUPER(WorldEntity, changedActivity);
    215        
     215
    216216        for (std::set<WorldEntity*>::const_iterator it = this->getAttachedObjects().begin(); it != this->getAttachedObjects().end(); it++)
    217217        {
     
    227227        }
    228228    }
    229    
     229
    230230    /**
    231231    @brief
     
    235235    {
    236236        SUPER(WorldEntity, changedVisibility);
    237        
     237
    238238        for (std::set<WorldEntity*>::const_iterator it = this->getAttachedObjects().begin(); it != this->getAttachedObjects().end(); it++)
    239239        {
  • code/branches/presentation3/src/orxonox/worldentities/WorldEntity.h

    r6524 r7127  
    105105            static const Vector3 DOWN;
    106106            static const Vector3 UP;
    107            
     107
    108108            virtual void changedActivity(void);
    109109            virtual void changedVisibility(void);
     
    234234            std::set<WorldEntity*> children_;
    235235            bool bDeleteWithParent_;
    236            
     236
    237237            bool bActiveMem_;
    238238            bool bVisibleMem_;
Note: See TracChangeset for help on using the changeset viewer.