diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2009-11-16 02:58:56 +0300 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2009-11-16 02:58:56 +0300 |
commit | b45ab480e07931406785c8fc877e7cee849c8998 (patch) | |
tree | 88dbf52d49d1a3c26a5f4683517cfd3d7d7adcbf /source/gameengine/GameLogic/SCA_ISensor.cpp | |
parent | 349fa813eaf413cd2f472e545e7ce2cb6b087b1c (diff) |
BGE: dynamic loading patch commited. API and demo files available here: https://projects.blender.org/tracker/?func=detail&aid=19492&group_id=9&atid=127
Diffstat (limited to 'source/gameengine/GameLogic/SCA_ISensor.cpp')
-rw-r--r-- | source/gameengine/GameLogic/SCA_ISensor.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/gameengine/GameLogic/SCA_ISensor.cpp b/source/gameengine/GameLogic/SCA_ISensor.cpp index 877563e3161..3191c99fb2f 100644 --- a/source/gameengine/GameLogic/SCA_ISensor.cpp +++ b/source/gameengine/GameLogic/SCA_ISensor.cpp @@ -160,6 +160,19 @@ void SCA_ISensor::RegisterToManager() m_eventmgr->RegisterSensor(this); } +void SCA_ISensor::Replace_EventManager(class SCA_LogicManager* logicmgr) +{ + if(m_links) { /* true if we're used currently */ + + m_eventmgr->RemoveSensor(this); + m_eventmgr= logicmgr->FindEventManager(m_eventmgr->GetType()); + m_eventmgr->RegisterSensor(this); + } + else { + m_eventmgr= logicmgr->FindEventManager(m_eventmgr->GetType()); + } +} + void SCA_ISensor::LinkToController(SCA_IController* controller) { m_linkedcontrollers.push_back(controller); |