bge bugfix: [#28362] Controllers names appear incorrectly with a python query
authorDalai Felinto <dfelinto@gmail.com>
Mon, 29 Aug 2011 03:20:15 +0000 (03:20 +0000)
committerDalai Felinto <dfelinto@gmail.com>
Mon, 29 Aug 2011 03:20:15 +0000 (03:20 +0000)
the uniquename was never fully implemented for sensors and actuators, only for controllers.
at some point we either get rid of all of them, or bring them all on.

For now removing the "unique name" of controllers

source/gameengine/Converter/KX_ConvertControllers.cpp

index 98afc3a690aa12387205a6fd7c142bb32645f72a..fafaaf5cef6fa507d01967bcaed40c24c02ac9e5 100644 (file)
@@ -210,7 +210,11 @@ void BL_ConvertControllers(
                        CIntValue* uniqueval = new CIntValue(uniqueint);
                        uniquename += uniqueval->GetText();
                        uniqueval->Release();
-                       gamecontroller->SetName(uniquename);
+                       //unique name was never implemented for sensors and actuators, only for controllers
+                       //and it's producing difference in the keys for the lists: obj.controllers/sensors/actuators
+                       //at some point it should either be implemented globally (and saved as a separate var) or removed.
+                       //gamecontroller->SetName(uniquename);
+                       gamecontroller->SetName(bcontr->name);
                        gameobj->AddController(gamecontroller);
                        
                        converter->RegisterGameController(gamecontroller, bcontr);