Skip to content

Commit

Permalink
Fix 'UnitVoicesController' when resource is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
Scony committed Jan 4, 2025
1 parent bf752c8 commit cbdb94f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/match/players/human/UnitVoicesController.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
extends Node

const Structure = preload("res://source/match/units/Structure.gd")
const ResourceUnit = preload("res://source/match/units/non-player/ResourceUnit.gd")

var _last_ack_event = 0

Expand All @@ -22,7 +23,7 @@ func _handle_event(event):


func _on_unit_selected(unit):
if not unit is Structure and unit.player == _player:
if not unit is Structure and not unit is ResourceUnit and unit.player == _player:
_handle_event(Constants.Match.VoiceNarrator.Events.UNIT_HELLO)
# TODO: handle building - perhaps with some sound instead of voice

Expand Down

0 comments on commit cbdb94f

Please sign in to comment.