Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 13, 2008, 9:55:01 PM (17 years ago)
Author:
dafrick
Message:

Changed from ControllableEntity to PlayerInfo…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/questsystem2/src/orxonox/objects/quest/QuestEffectBeacon.cc

    r2196 r2205  
    3535#include "core/EventIncludes.h"
    3636
     37#include "orxonox/objects/infos/PlayerInfo.h"
    3738#include "orxonox/objects/worldentities/ControllableEntity.h"
    3839#include "orxonox/objects/worldentities/triggers/PlayerTrigger.h"
     
    5051        this->times_ = -1;
    5152        this->trigger_ = NULL;
    52         this->player_ = NULL;
    5353    }
    5454
     
    6969    {
    7070        SetSubclassEvent(QuestEffectBeacon, "execute", execute, event, PlayerTrigger);
    71        
    72         this->player_ = dynamic_cast<ControllableEntity*>(event.originator_);
    7371    }
    7472   
    75     bool QuestEffectBeacon::execute(void)
     73    bool QuestEffectBeacon::execute(bool b, ControllableEntity* entity)
    7674    {
    77        
    78         if(!(this->isActive()))
     75        if(!b || !(this->isActive()))
    7976        {
    8077            return false;
    8178        }
    82         if(this->player_ == NULL)
     79        if(entity == NULL)
    8380        {
    8481            return false;
    8582        }
    8683       
    87         bool check = QuestEffect::invokeEffects(this->player_, this->effects_);
     84        PlayerInfo* player = entity->getPlayer();
     85       
     86        bool check = QuestEffect::invokeEffects(player, this->effects_);
    8887        if(check)
    8988        {
Note: See TracChangeset for help on using the changeset viewer.