mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-27 06:07:56 +03:00
Enabling vscript_client.nut and vscript_server.nut (fixes issue with doc aliases)
This commit is contained in:
parent
76db66f70a
commit
8316cf05ec
@ -13,9 +13,7 @@
|
|||||||
#include "characterset.h"
|
#include "characterset.h"
|
||||||
#include "isaverestore.h"
|
#include "isaverestore.h"
|
||||||
#include "gamerules.h"
|
#include "gamerules.h"
|
||||||
#ifdef _WIN32
|
#include "vscript_client.nut"
|
||||||
//#include "vscript_client_nut.h"
|
|
||||||
#endif
|
|
||||||
#ifdef MAPBASE_VSCRIPT
|
#ifdef MAPBASE_VSCRIPT
|
||||||
#include "c_world.h"
|
#include "c_world.h"
|
||||||
#include "proxyentity.h"
|
#include "proxyentity.h"
|
||||||
@ -405,13 +403,13 @@ bool VScriptClientInit()
|
|||||||
IGameSystem::RegisterVScriptAllSystems();
|
IGameSystem::RegisterVScriptAllSystems();
|
||||||
|
|
||||||
RegisterSharedScriptFunctions();
|
RegisterSharedScriptFunctions();
|
||||||
#else
|
|
||||||
if ( scriptLanguage == SL_SQUIRREL )
|
|
||||||
{
|
|
||||||
//g_pScriptVM->Run( g_Script_vscript_client );
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (scriptLanguage == SL_SQUIRREL)
|
||||||
|
{
|
||||||
|
g_pScriptVM->Run( g_Script_vscript_client );
|
||||||
|
}
|
||||||
|
|
||||||
VScriptRunScript( "mapspawn", false );
|
VScriptRunScript( "mapspawn", false );
|
||||||
|
|
||||||
VMPROF_SHOW( pszScriptLanguage, "virtual machine startup" );
|
VMPROF_SHOW( pszScriptLanguage, "virtual machine startup" );
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
static char g_Script_vscript_client[] = R"vscript(
|
||||||
//========== Copyright © 2008, Valve Corporation, All rights reserved. ========
|
//========== Copyright © 2008, Valve Corporation, All rights reserved. ========
|
||||||
//
|
//
|
||||||
// Purpose:
|
// Purpose:
|
||||||
@ -17,3 +18,5 @@ function IncludeScript( name, scope = null )
|
|||||||
}
|
}
|
||||||
return ::DoIncludeScript( name, scope );
|
return ::DoIncludeScript( name, scope );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
)vscript";
|
@ -15,9 +15,7 @@
|
|||||||
#include "sceneentity.h" // for exposing scene precache function
|
#include "sceneentity.h" // for exposing scene precache function
|
||||||
#include "isaverestore.h"
|
#include "isaverestore.h"
|
||||||
#include "gamerules.h"
|
#include "gamerules.h"
|
||||||
#ifdef _WIN32
|
#include "vscript_server.nut"
|
||||||
//#include "vscript_server_nut.h"
|
|
||||||
#endif
|
|
||||||
#ifdef MAPBASE_VSCRIPT
|
#ifdef MAPBASE_VSCRIPT
|
||||||
#include "world.h"
|
#include "world.h"
|
||||||
#endif
|
#endif
|
||||||
@ -555,13 +553,13 @@ bool VScriptServerInit()
|
|||||||
IGameSystem::RegisterVScriptAllSystems();
|
IGameSystem::RegisterVScriptAllSystems();
|
||||||
|
|
||||||
RegisterSharedScriptFunctions();
|
RegisterSharedScriptFunctions();
|
||||||
#else
|
|
||||||
if ( scriptLanguage == SL_SQUIRREL )
|
|
||||||
{
|
|
||||||
//g_pScriptVM->Run( g_Script_vscript_server );
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (scriptLanguage == SL_SQUIRREL)
|
||||||
|
{
|
||||||
|
g_pScriptVM->Run( g_Script_vscript_server );
|
||||||
|
}
|
||||||
|
|
||||||
VScriptRunScript( "mapspawn", false );
|
VScriptRunScript( "mapspawn", false );
|
||||||
|
|
||||||
VMPROF_SHOW( pszScriptLanguage, "virtual machine startup" );
|
VMPROF_SHOW( pszScriptLanguage, "virtual machine startup" );
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
static char g_Script_vscript_server[] = R"vscript(
|
||||||
//========== Copyright © 2008, Valve Corporation, All rights reserved. ========
|
//========== Copyright © 2008, Valve Corporation, All rights reserved. ========
|
||||||
//
|
//
|
||||||
// Purpose:
|
// Purpose:
|
||||||
@ -38,7 +39,7 @@ function __ReplaceClosures( script, scope )
|
|||||||
|
|
||||||
local tempParent = { getroottable = function() { return null; } };
|
local tempParent = { getroottable = function() { return null; } };
|
||||||
local temp = { runscript = script };
|
local temp = { runscript = script };
|
||||||
delegate tempParent : temp;
|
temp.set_delegate(tempParent);
|
||||||
|
|
||||||
temp.runscript()
|
temp.runscript()
|
||||||
foreach( key,val in temp )
|
foreach( key,val in temp )
|
||||||
@ -125,3 +126,4 @@ function __DumpScope( depth, table )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
)vscript";
|
Loading…
x
Reference in New Issue
Block a user