Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 20, 2017, 4:48:03 PM (6 years ago)
Author:
kohlia
Message:

Near object, near point and at area work!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ScriptableController_HS17/src/orxonox/worldentities/WorldEntity.cc

    r11562 r11583  
    4444#include "core/XMLPort.h"
    4545#include "Scene.h"
     46#include "Level.h"
    4647#include "collisionshapes/WorldEntityCollisionShape.h"
    4748#include "scriptablecontroller/scriptable_controller.h"
     
    185186        XMLPortObject(WorldEntity, CollisionShape, "collisionShapes", attachCollisionShape, getAttachedCollisionShape, xmlelement, mode);
    186187
    187         orxout(user_info) << "ID loaded" << std::endl;
     188        if(!this->id_.empty() && this->getLevel() != nullptr)
     189            this->getLevel()->getScriptableController()->registerWorldEntity(this->id_, this);
    188190    }
    189191
     
    280282    }
    281283
    282     void WorldEntity::registerToScriptableController(ScriptableController *controller)
    283     {
    284         orxout(user_info) << "Registering object to SC (" << this->id_ << ")" << std::endl;
    285         controller->registerWorldEntity(this->id_, this);
    286     }
    287 
    288284    /**
    289285    @brief
Note: See TracChangeset for help on using the changeset viewer.