Skip to content

Conversation

@Lumminal
Copy link

Summary

Adds SpawnPoints which can be used by mappers for jobs and late-join players.
Map Editor has 3 new prefabs, SecuritySpawnPoint, AssistantSpawnPoint and LateJoinSpawnPoint.

PR checklist

  • The game builds properly without errors.
  • No unrelated changes are present.
  • No "trash" files are committed.
  • Relevant code is documented.
  • Update the related GitBook document, or create a new one if needed.
  • Add art assets for spawn point prefabs
  • Add spawn points to available maps

Pictures/Videos

Will add soon

Testing

  • Open server
  • Open client instances
  • Start round
  • You should spawn at a spawn point according to your job or if you're late-joining

Networking checklist

  • Works from host in host mode.
  • Works from server in server mode.
  • Works on server in client mode.
  • Works and is syncronized across different clients.
  • Is persistent.

Changes

  • Adds prefabs named SpawnPoints with their own script called Spawn Point which hold SpawnPointData (scriptable object) and get registered in SpawnPointManager (subsystem) when the round is warming up
  • Adds ScriptableObject that holds the data about the Spawn Point, like SpawnType (is this a spawn point for a job, or a late-join? can be expanded for observers once that is implemented), and the job related to this Spawn Point if there's any (for now assistant and security).
  • Added a new subsystem SpawnPointManager which handles spawning during EntitySubSystem's SpawnPlayer() method. It chooses between valid spawn points, and if it doesn't find one, it logs as an error and the client will spawn at EntitySubSystem's _spawnPoint position (which was how it worked before).
  • Adds a new visibility layer in Tags and Layers called "MapEditor" which gets activated for people once they have the map editor ui open. The SpawnPoints live on that layer, therefore only the map editors can see them. Tested with different clients.

Related issues/PRs

Closes #1435

@Lumminal Lumminal marked this pull request as draft February 10, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spawn clients on different tiles

1 participant