Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/gameengine/GameLogic/SCA_LogicManager.cpp')
-rw-r--r--source/gameengine/GameLogic/SCA_LogicManager.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/source/gameengine/GameLogic/SCA_LogicManager.cpp b/source/gameengine/GameLogic/SCA_LogicManager.cpp
index 483a3c59a26..262f458abb2 100644
--- a/source/gameengine/GameLogic/SCA_LogicManager.cpp
+++ b/source/gameengine/GameLogic/SCA_LogicManager.cpp
@@ -116,6 +116,21 @@ void SCA_LogicManager::RegisterGameObjectName(const STR_String& gameobjname,
+void SCA_LogicManager::RegisterGameMeshName(const STR_String& gamemeshname, void* blendobj)
+{
+ STR_HashedString mn = gamemeshname;
+ m_map_gamemeshname_to_blendobj.insert(mn, blendobj);
+}
+
+
+
+void SCA_LogicManager::RegisterGameObj(CValue* gameobj, void* blendobj)
+{
+ m_map_gameobj_to_blendobj.insert(CHashedPtr(gameobj), blendobj);
+}
+
+
+
CValue* SCA_LogicManager::GetGameObjectByName(const STR_String& gameobjname)
{
STR_HashedString mn = "OB"+gameobjname;
@@ -128,6 +143,22 @@ CValue* SCA_LogicManager::GetGameObjectByName(const STR_String& gameobjname)
}
+void* SCA_LogicManager::FindBlendObjByGameObj(CValue* gameobject)
+{
+ void **obp= m_map_gameobj_to_blendobj[CHashedPtr(gameobject)];
+ return obp?*obp:NULL;
+}
+
+
+
+void* SCA_LogicManager::FindBlendObjByGameMeshName(const STR_String& gamemeshname)
+{
+ STR_HashedString mn = gamemeshname;
+ void **obp= m_map_gamemeshname_to_blendobj[mn];
+ return obp?*obp:NULL;
+}
+
+
void SCA_LogicManager::RemoveSensor(SCA_ISensor* sensor)
{