Added thread safe packet handlers
This commit is contained in:
@ -34,7 +34,10 @@ func handle_packet(data: PackedByteArray):
|
||||
|
||||
controller.server_position.x = x
|
||||
controller.server_position.z = z
|
||||
controller.direction_changed.emit(Vector3(direction_x, 0, direction_z))
|
||||
emit.call_deferred(controller, Vector3(direction_x, 0, direction_z))
|
||||
|
||||
func emit(controller: Controller, direction: Vector3):
|
||||
controller.direction_changed.emit(direction)
|
||||
|
||||
func _process(_delta: float):
|
||||
if !Global.player:
|
||||
|
Reference in New Issue
Block a user