mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-02-26 13:41:11 +03:00
Added CreateRopeWithSecondPointDetached function for VScript
This commit is contained in:
parent
4fdc0624a9
commit
551de3fe19
@ -861,6 +861,17 @@ static HSCRIPT ScriptCreateRope( HSCRIPT hStart, HSCRIPT hEnd, int iStartAttachm
|
||||
return ToHScript( pRope );
|
||||
}
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
static HSCRIPT ScriptCreateRopeWithSecondPointDetached( HSCRIPT hStart, int iStartAttachment, int ropeLength, float ropeWidth, const char *pMaterialName, int numSegments, bool initialHang, int ropeFlags )
|
||||
{
|
||||
CRopeKeyframe *pRope = CRopeKeyframe::CreateWithSecondPointDetached( ToEnt( hStart ), iStartAttachment, ropeLength, ropeWidth, pMaterialName, numSegments, initialHang );
|
||||
if (pRope)
|
||||
pRope->m_RopeFlags |= ropeFlags; // HACKHACK
|
||||
|
||||
return ToHScript( pRope );
|
||||
}
|
||||
#endif
|
||||
|
||||
static void EmitSoundParamsOn( HSCRIPT hParams, HSCRIPT hEnt )
|
||||
{
|
||||
CBaseEntity *pEnt = ToEnt( hEnt );
|
||||
@ -1042,6 +1053,9 @@ void RegisterSharedScriptFunctions()
|
||||
ScriptRegisterFunctionNamed( g_pScriptVM, ScriptDispatchParticleEffect, "DoDispatchParticleEffect", SCRIPT_ALIAS( "DispatchParticleEffect", "Dispatches a one-off particle system" ) );
|
||||
|
||||
ScriptRegisterFunctionNamed( g_pScriptVM, ScriptCreateRope, "CreateRope", "Creates a single rope between two entities. Can optionally follow specific attachments." );
|
||||
#ifndef CLIENT_DLL
|
||||
ScriptRegisterFunctionNamed( g_pScriptVM, ScriptCreateRopeWithSecondPointDetached, "CreateRopeWithSecondPointDetached", "Creates a single detached rope hanging from a point. Can optionally follow a specific start attachment." );
|
||||
#endif
|
||||
|
||||
ScriptRegisterFunction( g_pScriptVM, EmitSoundParamsOn, "Play EmitSound_t params on an entity." );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user