[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39470] branches/soc-2011-pepper/source: BGE Animations: Increasing the max layer count to 8 as per a user request.
Mitchell Stokes
mogurijin at gmail.com
Tue Aug 16 21:59:09 CEST 2011
Revision: 39470
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39470
Author: moguri
Date: 2011-08-16 19:59:08 +0000 (Tue, 16 Aug 2011)
Log Message:
-----------
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.
Modified Paths:
--------------
branches/soc-2011-pepper/source/blender/makesrna/intern/rna_actuator.c
branches/soc-2011-pepper/source/gameengine/Ketsji/BL_ActionManager.h
branches/soc-2011-pepper/source/gameengine/Ketsji/KX_GameObject.cpp
Modified: branches/soc-2011-pepper/source/blender/makesrna/intern/rna_actuator.c
===================================================================
--- branches/soc-2011-pepper/source/blender/makesrna/intern/rna_actuator.c 2011-08-16 19:24:25 UTC (rev 39469)
+++ branches/soc-2011-pepper/source/blender/makesrna/intern/rna_actuator.c 2011-08-16 19:59:08 UTC (rev 39470)
@@ -627,7 +627,7 @@
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);
Modified: branches/soc-2011-pepper/source/gameengine/Ketsji/BL_ActionManager.h
===================================================================
--- branches/soc-2011-pepper/source/gameengine/Ketsji/BL_ActionManager.h 2011-08-16 19:24:25 UTC (rev 39469)
+++ branches/soc-2011-pepper/source/gameengine/Ketsji/BL_ActionManager.h 2011-08-16 19:59:08 UTC (rev 39470)
@@ -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.
Modified: branches/soc-2011-pepper/source/gameengine/Ketsji/KX_GameObject.cpp
===================================================================
--- branches/soc-2011-pepper/source/gameengine/Ketsji/KX_GameObject.cpp 2011-08-16 19:24:25 UTC (rev 39469)
+++ branches/soc-2011-pepper/source/gameengine/Ketsji/KX_GameObject.cpp 2011-08-16 19:59:08 UTC (rev 39470)
@@ -3055,7 +3055,7 @@
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;
More information about the Bf-blender-cvs
mailing list