Thanks for this. After switching to this library, the code isn't that bloated anymore.
I had to fix some issues though:
- The __showSpawnsSprite glowing sprite is only precached in OnPluginStart where you initialize the library. After a mapchange the glows show some random model like some viewmodel or similar. I sepereated the precaching into another stock SC_SetSpawnSprite(showSpawnsSprite = -1).
- The KV handle isn't closed after writing to the config file.
- The main menu command handler is missing a return Plugin_Handled;
- If no config dir given, it still uses the plugin name with spaces instead of the one with replaced underscores.
Additionally the rotation of the spawnpoint was important, so that's saved now too.