Some bug fixes
This commit is contained in:
parent
2c9ef1cfe1
commit
3c50aeae5f
2 changed files with 9 additions and 5 deletions
|
|
@ -5,7 +5,6 @@ func _ready() -> void:
|
||||||
Session.dynamic_objects_spawner = self
|
Session.dynamic_objects_spawner = self
|
||||||
|
|
||||||
func request_spawn(data: Variant) -> Node:
|
func request_spawn(data: Variant) -> Node:
|
||||||
if is_multiplayer_authority() == false: return
|
|
||||||
if data.has("type") == false or data.has("spawn_name") == false:
|
if data.has("type") == false or data.has("spawn_name") == false:
|
||||||
return Node.new()
|
return Node.new()
|
||||||
match data.type:
|
match data.type:
|
||||||
|
|
@ -34,6 +33,7 @@ func request_spawn(data: Variant) -> Node:
|
||||||
return projectile
|
return projectile
|
||||||
"object":
|
"object":
|
||||||
var object: Node3D = Registry.spawnable_objects[data.spawn_name].instantiate()
|
var object: Node3D = Registry.spawnable_objects[data.spawn_name].instantiate()
|
||||||
|
|
||||||
|
|
||||||
for key in data.keys():
|
for key in data.keys():
|
||||||
object.set(key,data[key])
|
object.set(key,data[key])
|
||||||
|
|
|
||||||
|
|
@ -63,14 +63,18 @@ func exit() -> void:
|
||||||
|
|
||||||
@rpc("authority","call_local","reliable")
|
@rpc("authority","call_local","reliable")
|
||||||
func use_begin() -> void:
|
func use_begin() -> void:
|
||||||
current_state.use_begin()
|
if current_state != null:
|
||||||
|
current_state.use_begin()
|
||||||
|
|
||||||
@rpc("authority","call_local","reliable")
|
@rpc("authority","call_local","reliable")
|
||||||
func use_end() -> void:
|
func use_end() -> void:
|
||||||
current_state.use_end()
|
if current_state != null:
|
||||||
|
current_state.use_end()
|
||||||
func alternate_state() -> void:
|
func alternate_state() -> void:
|
||||||
current_state.alternate_state()
|
if current_state != null:
|
||||||
|
current_state.alternate_state()
|
||||||
# Need to clarify naming; Switch mode like firemode. For different states use
|
# Need to clarify naming; Switch mode like firemode. For different states use
|
||||||
# alternate_state
|
# alternate_state
|
||||||
func switch_mode() -> void:
|
func switch_mode() -> void:
|
||||||
current_state.switch_mode()
|
if current_state != null:
|
||||||
|
current_state.switch_mode()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue