Smoke effect and animations revamp

This commit is contained in:
Rendo 2025-12-17 11:51:28 +05:00
commit 4c3e35d1fc
20 changed files with 106 additions and 29 deletions

View file

@ -24,7 +24,7 @@ func _exit() -> void:
machine.animation_player.animation_finished.disconnect(on_animation_finished)
func on_animation_finished(animation):
if animation == with_morphems("shoot"):
if animation == machine.animation_prefix + with_morphems("shoot"):
transition.emit("Idle")
func _use_begin() -> void:
@ -38,8 +38,7 @@ func fire() -> void:
machine.ammo -= 1
bullets_shot += 1
machine.animation_player.stop()
machine.animation_player.play(with_morphems("shoot"))
machine.play(with_morphems("shoot"))
if is_multiplayer_authority():
Session.shoot_pellets(int(machine.player.name),limb_pellet_damage,torso_pellet_damage,head_pellet_damage,shoot_distance,pellet_spread.get_dots(),damage_reduction_curve)
@ -49,4 +48,4 @@ func fire() -> void:
machine.player_camera.recoil(horizontal_curve.sample(bullets_shot),vertical_curve.sample(bullets_shot))
func with_morphems(animation):
return machine.animation_prefix + ((animation+"_empty") if emptyable and machine.ammo == 0 else animation)
return ((animation+"_empty") if emptyable and machine.ammo == 0 else animation)