diff options
author | Thomas Szepe <HG1_public@gmx.net> | 2015-10-11 19:28:43 +0300 |
---|---|---|
committer | Thomas Szepe <HG1_public@gmx.net> | 2015-10-11 19:28:43 +0300 |
commit | 3dd83b533a032fe4e5e39a275e7f2fcff2beaf15 (patch) | |
tree | 279d9ffbd0b8ab0a1c2d723621b119c229fff66b /source/blender/makesrna/intern | |
parent | 88005475db5a774edfc3c408b553b04379dbd147 (diff) |
BGE: Adding a Max Jumps value to the character physic window
Actually we only have a Python API that allows to change the max jumps value.
The patch also allows non programmers to change the maximum numbers of jumps.
Reviewers: panzergame, sybren, campbellbarton, lordloki, moguri, agoose77
Reviewed By: lordloki, moguri
Projects: #game_engine
Differential Revision: https://developer.blender.org/D1302
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index e2d3db2335e..99af8c0a9ac 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -1771,6 +1771,14 @@ static void rna_def_object_game_settings(BlenderRNA *brna) RNA_def_property_float_default(prop, 55.0f); RNA_def_property_ui_text(prop, "Fall Speed Max", "Maximum speed at which the character will fall"); + prop = RNA_def_property(srna, "max_jumps", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "max_jumps"); + RNA_def_property_range(prop, 1, CHAR_MAX); + RNA_def_property_ui_range(prop, 1, 10, 1, 1); + RNA_def_property_int_default(prop, 1); + RNA_def_property_ui_text(prop, "Max Jumps", + "The maximum number of jumps the character can make before it hits the ground."); + /* Collision Masks */ prop = RNA_def_property(srna, "collision_group", PROP_BOOLEAN, PROP_LAYER_MEMBER); RNA_def_property_boolean_sdna(prop, NULL, "col_group", 1); |