mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-27 22:27:57 +03:00
Expose VPhysicsInitNormal and VPhysicsDestroyObject to VScript
This commit is contained in:
parent
7220a6de28
commit
468fa81f47
@ -485,6 +485,8 @@ BEGIN_ENT_SCRIPTDESC_ROOT( C_BaseEntity, "Root class of all client-side entities
|
|||||||
DEFINE_SCRIPTFUNC_NAMED( ScriptEntityToWorldTransform, "EntityToWorldTransform", "Get the entity's transform" )
|
DEFINE_SCRIPTFUNC_NAMED( ScriptEntityToWorldTransform, "EntityToWorldTransform", "Get the entity's transform" )
|
||||||
|
|
||||||
DEFINE_SCRIPTFUNC_NAMED( ScriptGetPhysicsObject, "GetPhysicsObject", "Get the entity's physics object if it has one" )
|
DEFINE_SCRIPTFUNC_NAMED( ScriptGetPhysicsObject, "GetPhysicsObject", "Get the entity's physics object if it has one" )
|
||||||
|
DEFINE_SCRIPTFUNC_NAMED( ScriptPhysicsInitNormal, "PhysicsInitNormal", "Initializes the entity's physics object with the specified solid type, solid flags, and whether to start asleep" )
|
||||||
|
DEFINE_SCRIPTFUNC_NAMED( ScriptPhysicsDestroyObject, "PhysicsDestroyObject", "Destroys the entity's physics object" )
|
||||||
|
|
||||||
DEFINE_SCRIPTFUNC( GetWaterLevel, "Get current level of water submergence" )
|
DEFINE_SCRIPTFUNC( GetWaterLevel, "Get current level of water submergence" )
|
||||||
|
|
||||||
|
@ -1206,6 +1206,8 @@ public:
|
|||||||
HSCRIPT ScriptEntityToWorldTransform( void );
|
HSCRIPT ScriptEntityToWorldTransform( void );
|
||||||
|
|
||||||
HSCRIPT ScriptGetPhysicsObject( void );
|
HSCRIPT ScriptGetPhysicsObject( void );
|
||||||
|
void ScriptPhysicsInitNormal( int nSolidType, int nSolidFlags, bool createAsleep );
|
||||||
|
void ScriptPhysicsDestroyObject() { VPhysicsDestroyObject(); }
|
||||||
|
|
||||||
void ScriptSetParent( HSCRIPT hParent, const char *szAttachment );
|
void ScriptSetParent( HSCRIPT hParent, const char *szAttachment );
|
||||||
HSCRIPT ScriptGetMoveParent( void );
|
HSCRIPT ScriptGetMoveParent( void );
|
||||||
|
@ -2312,6 +2312,8 @@ BEGIN_ENT_SCRIPTDESC_ROOT( CBaseEntity, "Root class of all server-side entities"
|
|||||||
DEFINE_SCRIPTFUNC_NAMED( ScriptEntityToWorldTransform, "EntityToWorldTransform", "Get the entity's transform" )
|
DEFINE_SCRIPTFUNC_NAMED( ScriptEntityToWorldTransform, "EntityToWorldTransform", "Get the entity's transform" )
|
||||||
|
|
||||||
DEFINE_SCRIPTFUNC_NAMED( ScriptGetPhysicsObject, "GetPhysicsObject", "Get the entity's physics object if it has one" )
|
DEFINE_SCRIPTFUNC_NAMED( ScriptGetPhysicsObject, "GetPhysicsObject", "Get the entity's physics object if it has one" )
|
||||||
|
DEFINE_SCRIPTFUNC_NAMED( ScriptPhysicsInitNormal, "PhysicsInitNormal", "Initializes the entity's physics object with the specified solid type, solid flags, and whether to start asleep" )
|
||||||
|
DEFINE_SCRIPTFUNC_NAMED( ScriptPhysicsDestroyObject, "PhysicsDestroyObject", "Destroys the entity's physics object" )
|
||||||
|
|
||||||
DEFINE_SCRIPTFUNC( ApplyAbsVelocityImpulse, "" )
|
DEFINE_SCRIPTFUNC( ApplyAbsVelocityImpulse, "" )
|
||||||
DEFINE_SCRIPTFUNC( ApplyLocalAngularVelocityImpulse, "" )
|
DEFINE_SCRIPTFUNC( ApplyLocalAngularVelocityImpulse, "" )
|
||||||
|
@ -2107,6 +2107,8 @@ public:
|
|||||||
HSCRIPT ScriptEntityToWorldTransform( void );
|
HSCRIPT ScriptEntityToWorldTransform( void );
|
||||||
|
|
||||||
HSCRIPT ScriptGetPhysicsObject( void );
|
HSCRIPT ScriptGetPhysicsObject( void );
|
||||||
|
void ScriptPhysicsInitNormal( int nSolidType, int nSolidFlags, bool createAsleep );
|
||||||
|
void ScriptPhysicsDestroyObject() { VPhysicsDestroyObject(); }
|
||||||
|
|
||||||
void ScriptSetParent(HSCRIPT hParent, const char *szAttachment);
|
void ScriptSetParent(HSCRIPT hParent, const char *szAttachment);
|
||||||
#endif
|
#endif
|
||||||
|
@ -2811,6 +2811,14 @@ HSCRIPT CBaseEntity::ScriptGetPhysicsObject( void )
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// Vscript: Gets the entity's physics object if it has one
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
void CBaseEntity::ScriptPhysicsInitNormal( int nSolidType, int nSolidFlags, bool createAsleep )
|
||||||
|
{
|
||||||
|
VPhysicsInitNormal( (SolidType_t)nSolidType, nSolidFlags, createAsleep );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef GAME_DLL
|
#ifdef GAME_DLL
|
||||||
#define SCRIPT_NEVER_THINK TICK_NEVER_THINK
|
#define SCRIPT_NEVER_THINK TICK_NEVER_THINK
|
||||||
|
@ -290,6 +290,17 @@ void RegisterSharedScriptConstants()
|
|||||||
ScriptRegisterConstant( g_pScriptVM, EF_ITEM_BLINK, "Effect flag used in GetEffects(), etc." );
|
ScriptRegisterConstant( g_pScriptVM, EF_ITEM_BLINK, "Effect flag used in GetEffects(), etc." );
|
||||||
ScriptRegisterConstant( g_pScriptVM, EF_PARENT_ANIMATES, "Effect flag used in GetEffects(), etc." );
|
ScriptRegisterConstant( g_pScriptVM, EF_PARENT_ANIMATES, "Effect flag used in GetEffects(), etc." );
|
||||||
|
|
||||||
|
//
|
||||||
|
// Solid Types
|
||||||
|
//
|
||||||
|
ScriptRegisterConstant( g_pScriptVM, SOLID_NONE, "Solid type used by VPhysics" );
|
||||||
|
ScriptRegisterConstant( g_pScriptVM, SOLID_BSP, "Solid type used by VPhysics" );
|
||||||
|
ScriptRegisterConstant( g_pScriptVM, SOLID_BBOX, "Solid type used by VPhysics" );
|
||||||
|
ScriptRegisterConstant( g_pScriptVM, SOLID_OBB, "Solid type used by VPhysics" );
|
||||||
|
ScriptRegisterConstant( g_pScriptVM, SOLID_OBB_YAW, "Solid type used by VPhysics" );
|
||||||
|
ScriptRegisterConstant( g_pScriptVM, SOLID_CUSTOM, "Solid type used by VPhysics" );
|
||||||
|
ScriptRegisterConstant( g_pScriptVM, SOLID_VPHYSICS, "Solid type used by VPhysics" );
|
||||||
|
|
||||||
//
|
//
|
||||||
// Solid Flags
|
// Solid Flags
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user