Removing the max acceleration value of the jump component

This commit is contained in:
AnonymusRaccoon
2020-01-03 13:54:26 +01:00
parent 5abf56e211
commit fca902986a
4 changed files with 2 additions and 4 deletions
-1
View File
@@ -14,7 +14,6 @@ struct jump_action
{
gc_component base;
int acceleration;
int max_acceleration;
};
extern const struct jump_action jump_action;
+1 -1
View File
@@ -12,7 +12,7 @@
<gravity_component speed="2000" />
<keyboard_controller left="16" right="3" jump="57" />
<walk_action acceleration="3000" max_acceleration="10000" />
<jump_action acceleration="7000" max_acceleration="100000000"/>
<jump_action acceleration="7000"/>
<friction_component value=".7" />
<collision_component />
</gc_entity>
-1
View File
@@ -24,7 +24,6 @@ static void fdctr(gc_scene *scene, void *component, node *n)
struct jump_action *cmp = (struct jump_action *)component;
cmp->acceleration = xml_getintprop(n, "acceleration");
cmp->max_acceleration = xml_getintprop(n, "max_acceleration");
(void)scene;
}
+1 -1
View File
@@ -25,7 +25,7 @@ gc_entity *entity, float dtime)
struct movable_component *mov = GETCMP(movable_component);
struct jump_action *jump = GETCMP(jump_action);
if (col->distance_down == 0 && mov->acceleration.y < jump->max_acceleration)
if (col->distance_down == 0)
mov->acceleration.y += con->jumping * jump->acceleration;
(void)system;
(void)dtime;