Skip to content
Merged
9 changes: 4 additions & 5 deletions sp/src/game/server/vscript_server.nut
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,16 @@ function ImpulseScale( flTargetMass, flDesiredSpeed )
}
__Documentation.RegisterHelp( "ImpulseScale", "float ImpulseScale(float, float)", "Returns an impulse scale required to push an object." );

local PrecacheModel = PrecacheModel
local PrecacheModel = DoPrecacheModel
function PrecacheModel( a, b = true )
{
return PrecacheModel( a, b )
}

local PrecacheOther = PrecacheOther
local PrecacheOther = DoPrecacheOther
function PrecacheOther( a, b = "" )
{
PrecacheOther( a, b )
return PrecacheOther( a, b )
}

function __ReplaceClosures( script, scope )
Expand All @@ -106,10 +106,9 @@ function __ReplaceClosures( script, scope )
}
}

local __OutputsPattern = regexp("^On.*Output$");

function ConnectOutputs( table )
{
local __OutputsPattern = regexp("^On.*Output$");
local nCharsToStrip = 6;
foreach( key, val in table )
{
Expand Down
4 changes: 2 additions & 2 deletions sp/src/game/shared/mapbase/vscript_funcs_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1049,10 +1049,10 @@ void RegisterSharedScriptFunctions()
//
// Precaching
//
ScriptRegisterFunctionNamed( g_pScriptVM, ScriptPrecacheModel, "PrecacheModel", "Precaches a model for later usage." );
ScriptRegisterFunctionNamed( g_pScriptVM, ScriptPrecacheModel, "DoPrecacheModel", SCRIPT_ALIAS( "PrecacheModel", "Precaches a model for later usage." ) );
ScriptRegisterFunction( g_pScriptVM, PrecacheMaterial, "Precaches a material for later usage." );
ScriptRegisterFunction( g_pScriptVM, PrecacheParticleSystem, "Precaches a particle system for later usage." );
ScriptRegisterFunctionNamed( g_pScriptVM, ScriptPrecacheOther, "PrecacheOther", "Precaches an entity class for later usage." );
ScriptRegisterFunctionNamed( g_pScriptVM, ScriptPrecacheOther, "DoPrecacheOther", SCRIPT_ALIAS( "PrecacheOther", "Precaches an entity class for later usage." ) );

//
// NPCs
Expand Down
2 changes: 1 addition & 1 deletion sp/src/game/shared/vscript_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ void RunAutorunScripts()

//-----------------------------------------------------------------------------

static short VSCRIPT_SERVER_SAVE_RESTORE_VERSION = 2;
static short VSCRIPT_SERVER_SAVE_RESTORE_VERSION = 3;

//-----------------------------------------------------------------------------

Expand Down
1 change: 1 addition & 0 deletions sp/src/public/vscript/ivscript.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ struct ScriptClassDesc_t
IScriptInstanceHelper * pHelper; // optional helper

#ifdef MAPBASE_VSCRIPT
public:
static CUtlVector<ScriptClassDesc_t*>& AllClassesDesc()
{
static CUtlVector<ScriptClassDesc_t*> classes;
Expand Down
Loading
Loading