Sword animations now sync
This commit is contained in:
@@ -48,9 +48,12 @@ func perform_attack() -> bool:
|
||||
if owner_character and owner_character.is_multiplayer_authority():
|
||||
owner_character._attack_timer = weapon_data.attack_cooldown
|
||||
|
||||
# Play attack animation on owner
|
||||
# Play attack animation on owner (use weapon's animation)
|
||||
if owner_character._body:
|
||||
owner_character._body.play_attack()
|
||||
var anim_name = weapon_data.attack_animation if weapon_data.attack_animation else "Attack_OneHand"
|
||||
owner_character._body.play_attack(anim_name)
|
||||
# Sync animation to other clients
|
||||
owner_character._sync_attack_animation.rpc(anim_name)
|
||||
|
||||
# Delay damage until animation hits (roughly 70% through the animation)
|
||||
# This makes the damage apply when the swing actually connects
|
||||
|
||||
Reference in New Issue
Block a user