mirror of
https://github.com/celisej567/BCWSsrc.git
synced 2026-09-21 20:15:08 +03:00
Adding vscript implementation
This commit is contained in:
@@ -969,6 +969,11 @@ int CHLClient::Init( CreateInterfaceFn appSystemFactory, CreateInterfaceFn physi
|
||||
if ( !CommandLine()->CheckParm( "-noscripting") )
|
||||
{
|
||||
scriptmanager = (IScriptManager *)appSystemFactory( VSCRIPT_INTERFACE_VERSION, NULL );
|
||||
|
||||
if (scriptmanager == nullptr)
|
||||
{
|
||||
scriptmanager = (IScriptManager*)Sys_GetFactoryThis()(VSCRIPT_INTERFACE_VERSION, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef WORKSHOP_IMPORT_ENABLED
|
||||
|
||||
@@ -11,6 +11,8 @@ $Configuration
|
||||
$PreprocessorDefinitions "$BASE;ASW_PROJECTED_TEXTURES;DYNAMIC_RTT_SHADOWS"
|
||||
|
||||
$PreprocessorDefinitions "$BASE;MAPBASE_RPC;DISCORD_RPC;STEAM_RPC" [$MAPBASE_RPC]
|
||||
|
||||
$PreprocessorDefinitions "$BASE;MAPBASE_VSCRIPT" [$MAPBASE_VSCRIPT]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,4 +53,9 @@ $Project
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$Folder "Link Libraries"
|
||||
{
|
||||
$Lib "vscript" [$MAPBASE_VSCRIPT]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -634,6 +634,11 @@ bool CServerGameDLL::DLLInit( CreateInterfaceFn appSystemFactory,
|
||||
if (!CommandLine()->CheckParm("-noscripting"))
|
||||
{
|
||||
scriptmanager = (IScriptManager*)appSystemFactory(VSCRIPT_INTERFACE_VERSION, NULL);
|
||||
|
||||
if (scriptmanager == nullptr)
|
||||
{
|
||||
scriptmanager = (IScriptManager*)Sys_GetFactoryThis()(VSCRIPT_INTERFACE_VERSION, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
// If not running dedicated, grab the engine vgui interface
|
||||
|
||||
@@ -9,6 +9,8 @@ $Configuration
|
||||
$Compiler
|
||||
{
|
||||
$PreprocessorDefinitions "$BASE;ASW_PROJECTED_TEXTURES;DYNAMIC_RTT_SHADOWS"
|
||||
|
||||
$PreprocessorDefinitions "$BASE;MAPBASE_VSCRIPT" [$MAPBASE_VSCRIPT]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,4 +83,9 @@ $Project
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$Folder "Link Libraries"
|
||||
{
|
||||
$Lib "vscript" [$MAPBASE_VSCRIPT]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,12 @@ extern ScriptClassDesc_t * GetScriptDesc( CBaseEntity * );
|
||||
|
||||
#endif // VMPROFILE
|
||||
|
||||
#ifdef MAPBASE_VSCRIPT
|
||||
// This is to ensure a dependency exists between the vscript library and the game DLLs
|
||||
extern int vscript_token;
|
||||
int vscript_token_hack = vscript_token;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
HSCRIPT VScriptCompileScript( const char *pszScriptName, bool bWarnMissing )
|
||||
|
||||
Reference in New Issue
Block a user