add player formatting and checking for active multiplayer instance
This commit is contained in:
@@ -112,7 +112,7 @@ func _update_visibility() -> void:
|
||||
|
||||
|
||||
func _unproject(pos: Vector3) -> Vector2:
|
||||
return Referencer.main_camera.unproject_position(pos)
|
||||
return Referencer.camera.unproject_position(pos)
|
||||
|
||||
|
||||
func _update_controls_label() -> void:
|
||||
@@ -196,8 +196,8 @@ func _append_event(key: String, frame: int, args: Array[Variant]) -> void:
|
||||
|
||||
func _draw_vector(from: Vector3, to: Vector3, color: Color) -> void:
|
||||
if (
|
||||
not Referencer.main_camera.is_position_in_frustum(from)
|
||||
and not Referencer.main_camera.is_position_in_frustum(to)
|
||||
not Referencer.camera.is_position_in_frustum(from)
|
||||
and not Referencer.camera.is_position_in_frustum(to)
|
||||
):
|
||||
return
|
||||
|
||||
@@ -223,7 +223,7 @@ func _draw_triangle(
|
||||
|
||||
|
||||
func _draw_marker(pos: Vector3, radius: float, color: Color) -> void:
|
||||
if not Referencer.main_camera.is_position_in_frustum(pos):
|
||||
if not Referencer.camera.is_position_in_frustum(pos):
|
||||
return
|
||||
|
||||
var x_start := _unproject(pos + (Vector3.LEFT * radius))
|
||||
@@ -240,7 +240,7 @@ func _draw_marker(pos: Vector3, radius: float, color: Color) -> void:
|
||||
|
||||
|
||||
func _draw_circle(pos: Vector3, color: Color) -> void:
|
||||
if not Referencer.main_camera.is_position_in_frustum(pos):
|
||||
if not Referencer.camera.is_position_in_frustum(pos):
|
||||
return
|
||||
|
||||
var point := _unproject(pos)
|
||||
@@ -284,7 +284,7 @@ func _on_control_draw() -> void:
|
||||
|
||||
_set_label_texts()
|
||||
|
||||
if !Referencer.main_camera:
|
||||
if !Referencer.camera:
|
||||
return
|
||||
|
||||
for v: Dictionary in _vectors_to_draw.values():
|
||||
|
||||
Reference in New Issue
Block a user