- Timestamp:
- Nov 13, 2008, 9:55:01 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem2/src/orxonox/objects/quest/QuestEffectBeacon.cc
r2196 r2205 35 35 #include "core/EventIncludes.h" 36 36 37 #include "orxonox/objects/infos/PlayerInfo.h" 37 38 #include "orxonox/objects/worldentities/ControllableEntity.h" 38 39 #include "orxonox/objects/worldentities/triggers/PlayerTrigger.h" … … 50 51 this->times_ = -1; 51 52 this->trigger_ = NULL; 52 this->player_ = NULL;53 53 } 54 54 … … 69 69 { 70 70 SetSubclassEvent(QuestEffectBeacon, "execute", execute, event, PlayerTrigger); 71 72 this->player_ = dynamic_cast<ControllableEntity*>(event.originator_);73 71 } 74 72 75 bool QuestEffectBeacon::execute( void)73 bool QuestEffectBeacon::execute(bool b, ControllableEntity* entity) 76 74 { 77 78 if(!(this->isActive())) 75 if(!b || !(this->isActive())) 79 76 { 80 77 return false; 81 78 } 82 if( this->player_== NULL)79 if(entity == NULL) 83 80 { 84 81 return false; 85 82 } 86 83 87 bool check = QuestEffect::invokeEffects(this->player_, this->effects_); 84 PlayerInfo* player = entity->getPlayer(); 85 86 bool check = QuestEffect::invokeEffects(player, this->effects_); 88 87 if(check) 89 88 {
Note: See TracChangeset
for help on using the changeset viewer.