BGE: bookmark option on controller to make them run before all other controllers.
authorBenoit Bolsee <benoit.bolsee@online.be>
Sun, 17 May 2009 21:50:31 +0000 (21:50 +0000)
committerBenoit Bolsee <benoit.bolsee@online.be>
Sun, 17 May 2009 21:50:31 +0000 (21:50 +0000)
commit9a40f4d2a63183edb741bd5280b27aa068773d92
tree4554f06e903f251fc4e165263135d27b758cf2b5
parent9ce8a676906b6b07b0971f0d5886ae338d188629
BGE: bookmark option on controller to make them run before all other controllers.

A new bookmark button is available on the controller UI.
When set, the controller is guaranteed to execute before all
other non-bookmarked controllers, provided it is scheduled
for execution.

This is useful for initialization scripts that run once at startup or
scripts that must set some prerequisite for the other controllers at
the start of each logic frame.

This feature is also available at python level with the "bookmark"
attribute. It can be changed during the game.

Note that if several script are bookmarked, their relative order of
execution is not guaranteed. Make sure they don't depend on each other.
source/blender/makesdna/DNA_controller_types.h
source/blender/src/buttons_logic.c
source/gameengine/Converter/KX_ConvertControllers.cpp
source/gameengine/GameLogic/SCA_IController.cpp
source/gameengine/GameLogic/SCA_IController.h
source/gameengine/GameLogic/SCA_IObject.cpp
source/gameengine/GameLogic/SCA_IObject.h
source/gameengine/Ketsji/KX_StateActuator.h
source/gameengine/PyDoc/GameTypes.py