fix alot of shit for webrtc to work
This commit is contained in:
@@ -126,7 +126,7 @@ func spawn_enemy():
|
||||
node = node.get_parent()
|
||||
|
||||
if game_world and game_world.has_method("_sync_smoke_puffs"):
|
||||
game_world._sync_smoke_puffs.rpc(name, puff_positions)
|
||||
game_world._rpc_to_ready_peers("_sync_smoke_puffs", [name, puff_positions])
|
||||
|
||||
# Wait for smoke puffs to finish animating before spawning enemy
|
||||
# Reduced duration for faster spawning: 4 frames * (1/10.0) seconds per frame = 0.4s, plus move_duration 1.0s, plus fade_duration 0.3s = ~1.7s total
|
||||
@@ -239,7 +239,7 @@ func spawn_enemy():
|
||||
# Pass humanoid_type if it's a humanoid enemy (for syncing to clients)
|
||||
var sync_humanoid_type = humanoid_type if humanoid_type != null else -1
|
||||
print(" DEBUG: Calling _sync_enemy_spawn.rpc with name=", name, " pos=", global_position, " scene_index=", scene_index, " humanoid_type=", sync_humanoid_type)
|
||||
game_world._sync_enemy_spawn.rpc(name, global_position, scene_index, sync_humanoid_type)
|
||||
game_world._rpc_to_ready_peers("_sync_enemy_spawn", [name, global_position, scene_index, sync_humanoid_type])
|
||||
print(" Sent RPC to sync enemy spawn to clients: spawner=", name, " pos=", global_position, " scene_index=", scene_index, " humanoid_type=", sync_humanoid_type)
|
||||
else:
|
||||
var has_method_str = str(game_world.has_method("_sync_enemy_spawn")) if game_world else "N/A"
|
||||
|
||||
Reference in New Issue
Block a user