Improved cloud saves
This commit is contained in:
@@ -702,17 +702,16 @@ func weapon_sway(delta):
|
||||
gun.look_at(gun_look_target.global_position)
|
||||
|
||||
#apply sway
|
||||
if !ads:
|
||||
var joy_input = Vector2(Input.get_joy_axis(0,JOY_AXIS_RIGHT_X)*5,Input.get_joy_axis(0,JOY_AXIS_RIGHT_Y)*5)
|
||||
mouse_input = lerp(mouse_input, Vector2.ZERO, 10 * delta)
|
||||
joy_input = lerp(joy_input,Vector2.ZERO,10 * delta)
|
||||
weapon_holder.rotation.x = lerp(weapon_holder.rotation.x, (mouse_input.y + joy_input.y) * weapon_sway_amount, 5 * delta)
|
||||
weapon_holder.rotation.y = lerp(weapon_holder.rotation.y, (mouse_input.x + joy_input.x) * weapon_sway_amount, 5 * delta)
|
||||
|
||||
else:
|
||||
if gun != null:
|
||||
if gun.weapon_info.ads == true:
|
||||
weapon_holder.rotation = Vector3.ZERO
|
||||
var joy_input = Vector2(Input.get_joy_axis(0,JOY_AXIS_RIGHT_X)*5,Input.get_joy_axis(0,JOY_AXIS_RIGHT_Y)*5)
|
||||
mouse_input = lerp(mouse_input, Vector2.ZERO, 10 * delta)
|
||||
joy_input = lerp(joy_input,Vector2.ZERO,10 * delta)
|
||||
weapon_holder.rotation.x = lerp(weapon_holder.rotation.x, (mouse_input.y + joy_input.y) * weapon_sway_amount, 5 * delta)
|
||||
weapon_holder.rotation.y = lerp(weapon_holder.rotation.y, (mouse_input.x + joy_input.x) * weapon_sway_amount, 5 * delta)
|
||||
#
|
||||
#else:
|
||||
#if gun != null:
|
||||
#if gun.weapon_info.ads == true:
|
||||
#weapon_holder.rotation = Vector3.ZERO
|
||||
|
||||
func weapon_bob(vel : float, delta):
|
||||
if weapon_holder:
|
||||
|
||||
Reference in New Issue
Block a user