In my FFA plugin I created a set of virtual spawn points, I mean they do not have an entity assigned to. In player spawn event I teleport the player to random virtual spawn point. It works but I am curious if it can be done using real spawn points.
My plugin is hot swappable and therefore default entities should be replaced with FFA ones, with the ability to revert these changes multiple times. I can easily remove default spawn points, but I cannot add new ones.
I did several tests and I found out that such entities should be created in early timing only, like in plugin_precache. It looks like there is some caching mechanism to create a tree of entities, with "info_player_deathmatch" and "info_player_start" classes, to store their indexes.
But if I have to remove entities, they will no longer work once I restore them back. Is there a function I can call to "cache" those entities like the engine does after plugin_precache? Or is there only teleport option? Maybe I can somehow disable spawn entities by assigning a player to it so that engine would not consider it for spawn?