Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 9, 2015, 2:15:46 PM (9 years ago)
Author:
landauf
Message:

removed changedGametype and getOldGametype from BaseObject. the gametype is never supposed to change anyway. the only exception is PlayerInfo which may change a gametype. but this happens in a completely controlled manner and can be done with a separate new function (switchGametype).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/libraries/core/BaseObject.h

    r10571 r10576  
    148148            inline virtual uint32_t getSceneID() const { return this->sceneID_; }
    149149
    150             inline void setGametype(const StrongPtr<Gametype>& gametype)
    151             {
    152                 if (gametype != this->gametype_)
    153                 {
    154                     this->oldGametype_ = this->gametype_;
    155                     this->gametype_ = gametype;
    156                     this->changedGametype();
    157                 }
    158             }
     150            inline void setGametype(const StrongPtr<Gametype>& gametype) { this->gametype_ = gametype; }
    159151            inline Gametype* getGametype() const { return this->gametype_; }
    160             inline Gametype* getOldGametype() const { return this->oldGametype_; }
    161             virtual void changedGametype() {}
    162152
    163153            inline void setLevel(const StrongPtr<Level>& level) { this->level_ = level; }
     
    219209            uint32_t               sceneID_;
    220210            StrongPtr<Gametype>    gametype_;
    221             Gametype*              oldGametype_;
    222211            StrongPtr<Level>       level_;
    223212            std::set<Template*>    templates_;
     
    235224    SUPER_FUNCTION(4, BaseObject, XMLEventPort, false);
    236225    SUPER_FUNCTION(8, BaseObject, changedName, false);
    237     SUPER_FUNCTION(9, BaseObject, changedGametype, false);
    238226}
    239227
Note: See TracChangeset for help on using the changeset viewer.