mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-17 20:10:21 +03:00
vscript additions and fixes:
baseentity_shared.cpp baseentity.cpp c_baseentity.h c_baseentity.cpp c_world.h - Fixed critical ScriptSetContextThink bugs - Added C_BaseEntity::SetContextThink (ScriptSetContextThink) - Added C_BaseEntity::SetSize - Added C_BaseEntity::SetModel - Added C_BaseEntity::Destroy baseentity.h baseentity.cpp - Removed duplicate functions ScriptSetSize and ScriptUtilRemove player.cpp - Moved player script instance registration before player_spawn event vscript_server.cpp - Added CEntities::FindByClassNearestFacing vscript_funcs_shared.cpp - Added GetFrameCount - Added IntervalPerTick vscript_singletons.cpp - Better game event descriptors for CScriptGameEventListener - Added ::effects (CEffectsScriptHelper) - Added ::Convars (CScriptConvarAccessor) vscript_shared.cpp - Fixed clientside entity printing in script VM mapbase_con_groups.h mapbase_con_groups.cpp - Improved performance by changing string comparisons to direct array access vscript_bindings_base.h vscript_bindings_base.cpp - Added CScriptKeyValues::SubKeysToTable vscript_bindings_math.cpp - Added ::SimpleSplineRemapVal - Added ::SimpleSplineRemapValClamped - Added ::Bias - Added ::Gain - Added ::SmoothCurve - Added ::SmoothCurve_Tweak - Added ::ExponentialDecay vscript_squirrel.nut - Added ::Lerp - Added ::FLerp - Added ::SimpleSpline vscript_squirrel.cpp - Added Vector::_unm - Added Vector::Set - Added Vector::Add - Added Vector::Subtract - Added Vector::Multiply - Added Vector::Divide - Added Vector::DistTo - Added Vector::DistToSqr - Added Vector::IsEqualTo - Added Vector::WithinAABox - Added Vector::FromKVString - Changed vector print syntax
This commit is contained in:
@@ -461,6 +461,11 @@ bool DoIncludeScript( const char *pszScript, HSCRIPT hScope )
|
||||
}
|
||||
|
||||
#ifdef MAPBASE_VSCRIPT
|
||||
static float FrameTime()
|
||||
{
|
||||
return gpGlobals->frametime;
|
||||
}
|
||||
|
||||
static bool Con_IsVisible()
|
||||
{
|
||||
return engine->Con_IsVisible();
|
||||
@@ -585,6 +590,7 @@ bool VScriptClientInit()
|
||||
ScriptRegisterFunction( g_pScriptVM, DoUniqueString, SCRIPT_ALIAS( "UniqueString", "Generate a string guaranteed to be unique across the life of the script VM, with an optional root string." ) );
|
||||
ScriptRegisterFunction( g_pScriptVM, DoIncludeScript, "Execute a script (internal)" );
|
||||
#ifdef MAPBASE_VSCRIPT
|
||||
ScriptRegisterFunction( g_pScriptVM, FrameTime, "Get the time spent on the client in the last frame" );
|
||||
ScriptRegisterFunction( g_pScriptVM, Con_IsVisible, "Returns true if the console is visible" );
|
||||
ScriptRegisterFunction( g_pScriptVM, ScreenWidth, "Width of the screen in pixels" );
|
||||
ScriptRegisterFunction( g_pScriptVM, ScreenHeight, "Height of the screen in pixels" );
|
||||
|
||||
Reference in New Issue
Block a user