diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2011-08-16 23:59:08 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2011-08-16 23:59:08 +0400 |
commit | 9b5c0f65aa6ef942709ea7156ee5a20e9b5f94e9 (patch) | |
tree | 4da96a1854895195a32c18b5a686511aeeaf70c8 /source | |
parent | 0b7911cf0a133b60921dea07567da2d1baf2c523 (diff) |
BGE Animations: Increasing the max layer count to 8 as per a user request. Also, layer checks were checking for values between 0 and MAX_ACTION_LAYERS when they should have been checking for values between 0 and MAX_ACTION_LAYERS - 1.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_actuator.c | 2 | ||||
-rw-r--r-- | source/gameengine/Ketsji/BL_ActionManager.h | 2 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c index 3c44720d469..5eccba16c3d 100644 --- a/source/blender/makesrna/intern/rna_actuator.c +++ b/source/blender/makesrna/intern/rna_actuator.c @@ -627,7 +627,7 @@ static void rna_def_action_actuator(BlenderRNA *brna) RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "layer", PROP_INT, PROP_NONE); - RNA_def_property_range(prop, 0, 4); /* This should match BL_ActionManager::MAX_ACTION_LAYERS */ + RNA_def_property_range(prop, 0, 7); /* This should match BL_ActionManager::MAX_ACTION_LAYERS - 1 */ RNA_def_property_ui_text(prop, "Layer", "The animation layer to play the action on"); RNA_def_property_update(prop, NC_LOGIC, NULL); diff --git a/source/gameengine/Ketsji/BL_ActionManager.h b/source/gameengine/Ketsji/BL_ActionManager.h index c310e231ed7..a3c8379981e 100644 --- a/source/gameengine/Ketsji/BL_ActionManager.h +++ b/source/gameengine/Ketsji/BL_ActionManager.h @@ -31,7 +31,7 @@ #include "BL_Action.h" -#define MAX_ACTION_LAYERS 4 +#define MAX_ACTION_LAYERS 8 /** * BL_ActionManager is responsible for handling a KX_GameObject's actions. diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 4f8860f4767..0864fc84a28 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -3055,7 +3055,7 @@ KX_PYMETHODDEF_DOC_VARARGS(KX_GameObject, sendMessage, static void layer_check(short &layer, const char *method_name) { - if (layer < 0 || layer > MAX_ACTION_LAYERS) + if (layer < 0 || layer >= MAX_ACTION_LAYERS) { printf("KX_GameObject.%s(): given layer (%d) is out of range (0 - %d), setting to 0.\n", method_name, layer, MAX_ACTION_LAYERS-1); layer = 0; |