[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26912] trunk/blender/source/gameengine/ Ketsji/KX_Scene.cpp: [#21023] 2 Dynamic loading patches (one bugfix, one feature)

Campbell Barton ideasman42 at gmail.com
Mon Feb 15 10:01:52 CET 2010


Revision: 26912
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26912
Author:   campbellbarton
Date:     2010-02-15 10:01:52 +0100 (Mon, 15 Feb 2010)

Log Message:
-----------
[#21023] 2 Dynamic loading patches (one bugfix, one feature)
patch from Mitchell Stokes (moguri), only the bugfix part for now.

Modified Paths:
--------------
    trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp

Modified: trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp	2010-02-15 08:50:04 UTC (rev 26911)
+++ trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp	2010-02-15 09:01:52 UTC (rev 26912)
@@ -1754,6 +1754,13 @@
 				phys_ctrl->SetPhysicsEnvironment(to->GetPhysicsEnvironment());
 		}
 	}
+
+	/* Add the object to the scene's logic manager */
+	to->GetLogicManager()->RegisterGameObjectName(gameobj->GetName(), gameobj);
+	to->GetLogicManager()->RegisterGameObj(gameobj->GetBlenderObject(), gameobj);
+
+	for (int i=0; i<gameobj->GetMeshCount(); ++i)
+		to->GetLogicManager()->RegisterGameMeshName(gameobj->GetMesh(i)->GetName(), gameobj->GetBlenderObject());
 }
 
 bool KX_Scene::MergeScene(KX_Scene *other)
@@ -1823,7 +1830,7 @@
 		//SCA_EventManager *evtmgr;
 		SCA_EventManager *evtmgr_other;
 
-		for(int i= 0; i < evtmgrs.size(); i++) {
+		for(unsigned int i= 0; i < evtmgrs.size(); i++) {
 			evtmgr_other= logicmgr_other->FindEventManager(evtmgrs[i]->GetType());
 
 			if(evtmgr_other) /* unlikely but possible one scene has a joystick and not the other */





More information about the Bf-blender-cvs mailing list