Spectator fix and team color fix
This commit is contained in:
parent
8d3b845857
commit
b0ba8adcd7
3 changed files with 3 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
||||||
# Godot 4+ specific ignores
|
# Godot 4+ specific ignores
|
||||||
.godot/
|
.godot/
|
||||||
/android/
|
/android/
|
||||||
|
export/
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ func set_active() -> void:
|
||||||
return
|
return
|
||||||
active = true
|
active = true
|
||||||
current = true
|
current = true
|
||||||
|
top_level = true
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
if active == false or not is_multiplayer_authority():
|
if active == false or not is_multiplayer_authority():
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,8 @@ extends Node
|
||||||
@export var blue_team_texture: Texture2D
|
@export var blue_team_texture: Texture2D
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
on_player_spawned.call_deferred()
|
get_tree().create_timer(1).timeout.connect(on_player_spawned)
|
||||||
|
|
||||||
func on_player_spawned() -> void:
|
func on_player_spawned() -> void:
|
||||||
await get_tree().process_frame
|
|
||||||
if player.team == Session.TEAMS.DEFENCE:
|
if player.team == Session.TEAMS.DEFENCE:
|
||||||
material.albedo_texture = blue_team_texture
|
material.albedo_texture = blue_team_texture
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue