Added support for "mapspawn_addon" scripts in addon paths (inspired by L4D2)

This commit is contained in:
Blixibon
2022-08-28 13:10:23 -05:00
parent 1426eccc68
commit daf55037fe
4 changed files with 192 additions and 9 deletions

View File

@@ -672,6 +672,8 @@ bool VScriptServerInit()
VScriptRunScript( "mapspawn", false );
#ifdef MAPBASE_VSCRIPT
RunAddonScripts();
// Since the world entity spawns before VScript is initted, RunVScripts() is called before the VM has started, so no scripts are run.
// This gets around that by calling the same function right after the VM is initted.
GetWorldEntity()->RunVScripts();