diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2009-11-22 03:01:52 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2009-11-22 03:01:52 +0300 |
commit | 573be3e687c9db985b1cfdb670e038370ba30628 (patch) | |
tree | 32051d76352b6b737b155b312c97e66b5d1d6761 /source/gameengine/GameLogic | |
parent | 1dfbf3a9f6d435fab163d0badf7ea6df17d8e2e0 (diff) |
BGE: Removing OB prefix from object names - This will break scripts !!!! (also removing AC and ME :: internal changes only)
How it works now:
whenever you have to read/write object names you can do it without the prefix "OB". (it's not hard at all to fix scripts)
How it was before:
It was a mess :)
We had an inconsistent API where sometimes you had to input "OBname" and other "name" directly to assign object as data (usually in actuators).
Justification for the change:
Talking with Campbell we had since a while ago this feeling that this should be changed any time we were going to deprecate the API. So in order to deliver Blender 2.5beta0 with a more close-to-the-final API we decided that today was a good day to implement that.
Remaining issues:
1) VideoTexture uses IM or MA to identify the output material/texture. I haven't touched that, but it does look a bit off. (i.e. I didn't changed any MA, IM naming)
2) I didn't see the code of dynamic mesh. It may need to be edited as well.
Diffstat (limited to 'source/gameengine/GameLogic')
-rw-r--r-- | source/gameengine/GameLogic/SCA_LogicManager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/gameengine/GameLogic/SCA_LogicManager.cpp b/source/gameengine/GameLogic/SCA_LogicManager.cpp index 848b7df6658..fe97add9a3f 100644 --- a/source/gameengine/GameLogic/SCA_LogicManager.cpp +++ b/source/gameengine/GameLogic/SCA_LogicManager.cpp @@ -119,7 +119,7 @@ void SCA_LogicManager::UnregisterGameObj(void* blendobj, CValue* gameobj) CValue* SCA_LogicManager::GetGameObjectByName(const STR_String& gameobjname) { - STR_HashedString mn = "OB"+gameobjname; + STR_HashedString mn = gameobjname; CValue** gameptr = m_mapStringToGameObjects[mn]; if (gameptr) @@ -252,7 +252,7 @@ void SCA_LogicManager::UpdateFrame(double curtime, bool frame) void* SCA_LogicManager::GetActionByName (const STR_String& actname) { - STR_HashedString an = "AC"+actname; + STR_HashedString an = actname; void** actptr = m_mapStringToActions[an]; if (actptr) @@ -265,7 +265,7 @@ void* SCA_LogicManager::GetActionByName (const STR_String& actname) void* SCA_LogicManager::GetMeshByName(const STR_String& meshname) { - STR_HashedString mn = "ME"+meshname; + STR_HashedString mn = meshname; void** meshptr = m_mapStringToMeshes[mn]; if (meshptr) |