diff --git a/lib/classes/movement_state_receiver.gd b/lib/classes/movement_state_receiver.gd index 9afe3c2..34ef58f 100644 --- a/lib/classes/movement_state_receiver.gd +++ b/lib/classes/movement_state_receiver.gd @@ -357,11 +357,19 @@ func resolve_h_acceleration(_params :Dictionary, _inertia :Vector2, _move_direct ## TODO: Adjust for jerk, determine if we're currently experiencing accel ## if a speed difference applies var _acceleration :float = 0.0 + var base_speed :float = _params["_base_h_move_speed"] if _params["_base_h_move_speed_modifier"] != 0: - _acceleration = _params["_base_h_move_acceleration"] + _params["_base_h_move_modifier_move_acceleration"] + var speed_differance = base_speed + _params["_base_h_move_speed_modifier"] + _acceleration = _params["_base_h_move_acceleration"] #+ _params["_base_h_move_modifier_move_acceleration"] + ##WIP: Add part where offset acceleration only applies until the inertia equals the offset or whatever + if sign(_params["_base_h_move_modifier_move_acceleration"]) == -1 and abs(_inertia.x) >= speed_differance: + #print("I should add the modifier acceleration maybe?") + _acceleration += _params["_base_h_move_modifier_move_acceleration"] + else: + print ("not yet.") else: _acceleration = _params["_base_h_move_acceleration"] - ##TODO: Add part where offset acceleration only applies until the inertia equals the offset or whatever + #_acceleration *= sign(_move_direction) diff --git a/src/actors/players/playerE/states/roll.tres b/src/actors/players/playerE/states/roll.tres index b1dce7e..d82ada1 100644 --- a/src/actors/players/playerE/states/roll.tres +++ b/src/actors/players/playerE/states/roll.tres @@ -12,6 +12,6 @@ name = "roll" horizontal_speed = 150.0 horizontal_acceleration = 1.36422e-12 horizontal_speed_offset = -140.0 -horizontal_speed_offset_acceleration = -50.0 +horizontal_speed_offset_acceleration = -300.0 jerk_factor = 0.0 animation_sequence = [ "roll" ]