Skip to content

Commit

Permalink
fix: emote player (#447)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuruk-mm authored Sep 20, 2024
1 parent 9973192 commit 52477a5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion godot/src/ui/components/emotes/emote_wheel.gd
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,12 @@ func _physics_process(_delta):
func _on_play_emote(emote_urn: String):
self.hide()
Global.explorer_grab_focus()
if avatar_node:
if avatar_node != null:
var emote_controller = avatar_node.emote_controller
emote_controller.play_emote(emote_urn)
emote_controller.broadcast_avatar_animation(emote_urn)
else:
printerr("No avatar node in EmoteWheel!")


func _on_select_emote(selected: bool, emote_urn: String, child: EmoteItemUi):
Expand Down
3 changes: 3 additions & 0 deletions godot/src/ui/explorer.gd
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ var virtual_joystick: Control = $UI/SafeMarginContainer/InteractableHUD/MobileUI
@onready var loading_ui = $UI/Loading

@onready var button_mic = %Button_Mic
@onready var emote_wheel = %EmoteWheel


func _process(_dt):
Expand Down Expand Up @@ -96,6 +97,8 @@ func _ready():
else:
%Timer_BroadcastPosition.follow_node = player.avatar

emote_wheel.avatar_node = player.avatar

loading_ui.enable_loading_screen()
var cmd_params = get_params_from_cmd()
var cmd_realm = Global.FORCE_TEST_REALM if Global.FORCE_TEST else cmd_params[0]
Expand Down
1 change: 1 addition & 0 deletions godot/src/ui/explorer.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ grow_horizontal = 2
grow_vertical = 0

[node name="EmoteWheel" parent="UI" instance=ExtResource("21_pows0")]
unique_name_in_owner = true
visible = false
layout_mode = 1

Expand Down

0 comments on commit 52477a5

Please sign in to comment.