fix alot of shit for webrtc to work
This commit is contained in:
@@ -268,6 +268,19 @@ func _update_client_visuals():
|
||||
# Update visuals on clients based on synced state
|
||||
super._update_client_visuals()
|
||||
|
||||
# Map synced state to animation (similar to how bat/rat use state directly)
|
||||
match state:
|
||||
SlimeState.IDLE:
|
||||
_set_animation("IDLE")
|
||||
SlimeState.MOVING:
|
||||
_set_animation("MOVE")
|
||||
SlimeState.JUMPING:
|
||||
_set_animation("JUMP")
|
||||
SlimeState.DAMAGED:
|
||||
_set_animation("DAMAGE")
|
||||
SlimeState.DYING:
|
||||
_set_animation("DIE")
|
||||
|
||||
# Update animation based on synced state
|
||||
_update_animation(0.0) # Update animation immediately when state changes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user