Removed unnecessary globals
This commit is contained in:
parent
124902f39f
commit
32dbaa3673
@ -5,8 +5,6 @@ extends Node
|
||||
|
||||
var camera: Camera3D
|
||||
var player: Player
|
||||
var viewport: Viewport
|
||||
var window: Window
|
||||
var players: PlayerManager
|
||||
var account_id: String
|
||||
var auth_token: String
|
||||
@ -17,5 +15,3 @@ var username: String
|
||||
func _enter_tree():
|
||||
instance_id = OS.get_process_id() % 4
|
||||
username = "user%d" % instance_id
|
||||
viewport = get_viewport()
|
||||
window = get_window()
|
@ -3,7 +3,7 @@ extends OptionButton
|
||||
var fsrQuality: Array[float] = [0.50, 0.59, 0.67, 0.77, 1.0]
|
||||
|
||||
func _ready():
|
||||
var viewport_scale := Global.viewport.scaling_3d_scale
|
||||
var viewport_scale := get_viewport().scaling_3d_scale
|
||||
var closest := -1
|
||||
var closest_diff := 999.0
|
||||
|
||||
@ -17,4 +17,4 @@ func _ready():
|
||||
selected = closest
|
||||
|
||||
func on_item_selected(index):
|
||||
Global.viewport.scaling_3d_scale = fsrQuality[index]
|
||||
get_viewport().scaling_3d_scale = fsrQuality[index]
|
@ -1,7 +1,7 @@
|
||||
extends OptionButton
|
||||
|
||||
func _ready():
|
||||
match Global.viewport.scaling_3d_mode:
|
||||
match get_viewport().scaling_3d_mode:
|
||||
Viewport.SCALING_3D_MODE_BILINEAR:
|
||||
selected = 0
|
||||
Viewport.SCALING_3D_MODE_FSR:
|
||||
@ -12,8 +12,8 @@ func _ready():
|
||||
func on_item_selected(index: int):
|
||||
match index:
|
||||
0:
|
||||
Global.viewport.scaling_3d_mode = Viewport.SCALING_3D_MODE_BILINEAR
|
||||
get_viewport().scaling_3d_mode = Viewport.SCALING_3D_MODE_BILINEAR
|
||||
1:
|
||||
Global.viewport.scaling_3d_mode = Viewport.SCALING_3D_MODE_FSR
|
||||
get_viewport().scaling_3d_mode = Viewport.SCALING_3D_MODE_FSR
|
||||
2:
|
||||
Global.viewport.scaling_3d_mode = Viewport.SCALING_3D_MODE_FSR2
|
||||
get_viewport().scaling_3d_mode = Viewport.SCALING_3D_MODE_FSR2
|
||||
|
Loading…
Reference in New Issue
Block a user