RE-SS3D / SS3D

Space Station 3D, another remake of SS13, but with an extra D.
https://ss3d.space/
249 stars 138 forks source link

Spawn clients on different tiles #1435

Open stilnat opened 4 months ago

stilnat commented 4 months ago

Summary

Currently, clients are spawning at the exact same location, resulting in clipping. Before spawning a player, server should choose a free tile, without tile objects or players and spawn the new player there.

One simple solution would be to predefine a list of tile location spawn and spawn the player on any of those, if it's free. If no free location, spawn at (0,0) with an error message for now. We'll improve the algorithm later.

cosmiccoincidence commented 4 months ago

I would actually make this map-based, not code-based. The way I would like to see it done is by creating spawnpoint objects. These objects can be placed in the map editor. They will not be visible or interactive with the players in the round. They would only be visible to admins who have the map editor active.

stilnat commented 4 months ago

okay so small correction, create a prefab called SpawnPoint that acts as a tile object, with a script so they register to a spawn system (maybe use one of the systems we already have if it makes sense), and use the tile coordinates from those spawn point to define where to spawn.

Same as above, If no free location, spawn at (0,0) with an error message for now.

CREATURACHRISTO commented 3 months ago

Assign me