🐛 fix pawn check for player in singleplayer mode

This commit is contained in:
anyreso 2024-04-29 13:21:32 -04:00
parent 9c8f6b4d3d
commit cf95b4a25d

View file

@ -91,7 +91,9 @@ func _setup_pawn(_new_player_id : int) -> void:
weapon.hide()
func _is_pawn() -> bool:
return multiplayer.get_unique_id() == match_participant_component.player_id
var game : Node3D = get_node("/root/Game")
var peer_is_pawn = multiplayer.get_unique_id() == match_participant_component.player_id
return game.mode is Singleplayer or peer_is_pawn
func _fire_primary() -> void:
if _is_player_dead():