Changeset 2195 for code/branches/questsystem2/src
- Timestamp:
- Nov 12, 2008, 2:28:46 PM (16 years ago)
- Location:
- code/branches/questsystem2/src/orxonox/objects/quest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem2/src/orxonox/objects/quest/QuestEffectBeacon.cc
r2193 r2195 32 32 #include "core/CoreIncludes.h" 33 33 #include "core/XMLPort.h" 34 #include "core/Event.h" 34 35 #include "core/EventIncludes.h" 35 36 … … 49 50 this->times_ = -1; 50 51 this->trigger_ = NULL; 52 this->player_ = NULL; 51 53 } 52 54 … … 67 69 { 68 70 SetSubclassEvent(QuestEffectBeacon, "execute", execute, event, PlayerTrigger); 71 72 this->player_ = dynamic_cast<ControllableEntity*>(event.originator_); 69 73 } 70 74 71 bool QuestEffectBeacon::execute( ControllableEntity* player)75 bool QuestEffectBeacon::execute(void) 72 76 { 77 73 78 if(!(this->isActive())) 74 79 { 75 80 return false; 76 81 } 77 if( player== NULL)82 if(this->player_ == NULL) 78 83 { 79 84 return false; 80 85 } 81 86 82 bool check = QuestEffect::invokeEffects( player, this->effects_);87 bool check = QuestEffect::invokeEffects(this->player_, this->effects_); 83 88 if(check) 84 89 { -
code/branches/questsystem2/src/orxonox/objects/quest/QuestEffectBeacon.h
r2193 r2195 63 63 virtual void processEvent(Event& event); 64 64 65 bool execute( ControllableEntity* player);65 bool execute(void); 66 66 67 67 bool isActive(void); … … 78 78 QuestEffectBeaconStatus::Enum status_; 79 79 PlayerTrigger* trigger_; 80 ControllableEntity* player_; 80 81 81 82 bool setTimes(const int & n);
Note: See TracChangeset
for help on using the changeset viewer.