mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-02-05 02:00:34 +03:00
Added GetViewModel function for VScript
This commit is contained in:
parent
e4d5d946d2
commit
f8a8d49be7
@ -551,6 +551,8 @@ BEGIN_ENT_SCRIPTDESC( CBasePlayer, CBaseCombatCharacter, "The player entity." )
|
|||||||
DEFINE_SCRIPTFUNC_NAMED( ScriptGetEyeRight, "GetEyeRight", "Gets the player's right eye vector." )
|
DEFINE_SCRIPTFUNC_NAMED( ScriptGetEyeRight, "GetEyeRight", "Gets the player's right eye vector." )
|
||||||
DEFINE_SCRIPTFUNC_NAMED( ScriptGetEyeUp, "GetEyeUp", "Gets the player's up eye vector." )
|
DEFINE_SCRIPTFUNC_NAMED( ScriptGetEyeUp, "GetEyeUp", "Gets the player's up eye vector." )
|
||||||
|
|
||||||
|
DEFINE_SCRIPTFUNC_NAMED( ScriptGetViewModel, "GetViewModel", "Returns the viewmodel of the specified index." )
|
||||||
|
|
||||||
//
|
//
|
||||||
// Hooks
|
// Hooks
|
||||||
//
|
//
|
||||||
@ -7148,6 +7150,19 @@ HSCRIPT CBasePlayer::VScriptGetExpresser()
|
|||||||
|
|
||||||
return hScript;
|
return hScript;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
HSCRIPT CBasePlayer::ScriptGetViewModel( int viewmodelindex )
|
||||||
|
{
|
||||||
|
if (viewmodelindex < 0 || viewmodelindex >= MAX_VIEWMODELS)
|
||||||
|
{
|
||||||
|
Warning( "GetViewModel: Invalid index '%i'\n", viewmodelindex );
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ToHScript( GetViewModel( viewmodelindex ) );
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -412,6 +412,8 @@ public:
|
|||||||
const Vector& ScriptGetEyeForward() { static Vector vecForward; EyeVectors( &vecForward, NULL, NULL ); return vecForward; }
|
const Vector& ScriptGetEyeForward() { static Vector vecForward; EyeVectors( &vecForward, NULL, NULL ); return vecForward; }
|
||||||
const Vector& ScriptGetEyeRight() { static Vector vecRight; EyeVectors( NULL, &vecRight, NULL ); return vecRight; }
|
const Vector& ScriptGetEyeRight() { static Vector vecRight; EyeVectors( NULL, &vecRight, NULL ); return vecRight; }
|
||||||
const Vector& ScriptGetEyeUp() { static Vector vecUp; EyeVectors( NULL, NULL, &vecUp ); return vecUp; }
|
const Vector& ScriptGetEyeUp() { static Vector vecUp; EyeVectors( NULL, NULL, &vecUp ); return vecUp; }
|
||||||
|
|
||||||
|
HSCRIPT ScriptGetViewModel( int viewmodelindex );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// View model prediction setup
|
// View model prediction setup
|
||||||
|
Loading…
x
Reference in New Issue
Block a user