diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2008-09-25 20:19:07 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2008-09-25 20:19:07 +0400 |
commit | c9c9b2e8332786128fa078acb598987a3b419b5c (patch) | |
tree | 3e46a8828b8836620b9ae47ce841eee04c720c54 /source/gameengine/Converter/KX_ConvertProperties.cpp | |
parent | 04fa0fd8692dcf402d212245293f5082bb08d630 (diff) |
BGE patch: add Debug button next to object state. The object state mask will be printed at runtime with the debug info as a comma separated list of state numbers (1..30) for each active state bit. The reserved property name __state__ is used for that purpose (users should not create a property with that name).
Diffstat (limited to 'source/gameengine/Converter/KX_ConvertProperties.cpp')
-rw-r--r-- | source/gameengine/Converter/KX_ConvertProperties.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/gameengine/Converter/KX_ConvertProperties.cpp b/source/gameengine/Converter/KX_ConvertProperties.cpp index aae8752671f..dfbc6f0c48d 100644 --- a/source/gameengine/Converter/KX_ConvertProperties.cpp +++ b/source/gameengine/Converter/KX_ConvertProperties.cpp @@ -132,6 +132,10 @@ void BL_ConvertProperties(Object* object,KX_GameObject* gameobj,SCA_TimeEventMan prop = prop->next; } - - + // check if state needs to be debugged + if (object->scaflag & OB_DEBUGSTATE) + { + // reserve name for object state + scene->AddDebugProperty(gameobj,STR_String("__state__")); + } } |