Added new features and customization to base VScript functionality

This commit is contained in:
Blixibon
2020-05-27 10:22:45 -05:00
parent 6ad2745a5e
commit c12418e1ce
11 changed files with 124 additions and 0 deletions

View File

@@ -16,6 +16,9 @@
#ifdef _WIN32
//#include "vscript_client_nut.h"
#endif
#ifdef MAPBASE_VSCRIPT
#include "c_world.h"
#endif
extern IScriptManager *scriptmanager;
extern ScriptClassDesc_t * GetScriptDesc( CBaseEntity * );
@@ -73,6 +76,14 @@ bool VScriptClientInit()
ScriptLanguage_t scriptLanguage = SL_DEFAULT;
char const *pszScriptLanguage;
#ifdef MAPBASE_VSCRIPT
if (GetClientWorldEntity()->GetScriptLanguage() != SL_NONE)
{
// Allow world entity to override script language
scriptLanguage = GetClientWorldEntity()->GetScriptLanguage();
}
else
#endif
if ( CommandLine()->CheckParm( "-scriptlang", &pszScriptLanguage ) )
{
if( !Q_stricmp(pszScriptLanguage, "gamemonkey") )