Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion addons/gecs/network/spawn_manager.gd
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,16 @@ func _inject_authority_markers(entity: Entity, net_id: CN_NetworkIdentity) -> vo
# Remove stale markers first -- idempotent re-spawn safety
entity.remove_component(CN_LocalAuthority)
entity.remove_component(CN_ServerAuthority)
entity.remove_component(CN_RemoteEntity)

# CN_ServerAuthority: server-owned entities (peer_id == 0) on ALL peers
if net_id.is_server_owned():
entity.add_component(CN_ServerAuthority.new())


# CN_RemoteEntity: an entity owned by a remote peer (peer_id != multiplayer unique ID)
elif net_id.peer_id != _ns.net_adapter.get_multiplayer().get_unique_id():
entity.add_component(CN_RemoteEntity.new())

# CN_LocalAuthority: local peer's own entity
# Also: server gets CN_LocalAuthority on server-owned entities (server "is local" for them)
if (
Expand Down