Here's a preview of changes coming to soap:
Completely reworked the spawn system. Nothing will change for players, but soap's spawn system is currently... massively hacked together, and a complete fucking disaster.
The spawn system as it currently stands makes a copy of the spawn config 65 times * 2 (one for red spawns, one for blu spawns) on map load, and then iterates thru those copies the same amount of times as their are players on the server to make a new temporary copy of the spawns, and then grabs a random spawn from this new local copy, deletes the local copy, traces a box to the position it finds, and checks for collision with players, and if there are none, spawns the player there.
This is hilariously wasteful, not to mention the fact that it's using the wrong functions to grab and store data, which made it incredibly difficult to know wtf was actually going on.
Especially because basically none of it was commented.
I tore most of that shit out. It currently now just creates a single spawn handle for each team, grabs each spawn and pushes it to the end of the spawn array, and grabs a random index of a random spawn for the client's team. Then, it does the same box tracing test, but I've added sanity checks so that 1) players can't spawn outside the world and 2) players can't spawn clipping into the world. If SOAP finds either of these scenarios, it will delete that spawn from the spawn list it has and never try to spawn another player there again for that map, and will throw errors in console about it.
These improvements have also allowed me to add a new feature: soap_debugspawns.
Set this cvar to 1 to show a green box in the tracebox around a player's spawn whenever soap spawns them -
Set this cvar to 2 to show team colored boxes around all spawns on the map -
They will be pink if a spawn is shared between both teams -
Soap will also yell at you in chat about bad spawns if you have them, like this one I made to test this -
I also added soap_novelocityonspawn (defaults to 1), to prevent players from retaining their velocity from their previous lives when being teleported by SOAP.
I plan on adding twiikuu's suggestion, soap_loadspawns (or a similarly named command, eg sm_soap_loadmap etc), to allow server owners to load soap using an older version of a map's configs on newer versions of maps without configs for them yet.