mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-02-04 17:50:30 +03:00
New Get/SetGroundEntity, Get/SetModelScale functions for VScript
This commit is contained in:
parent
d18b5a2144
commit
032cfdaec3
@ -502,6 +502,9 @@ BEGIN_ENT_SCRIPTDESC_ROOT( C_BaseEntity, "Root class of all client-side entities
|
||||
DEFINE_SCRIPTFUNC_NAMED( GetScriptOwnerEntity, "GetOwner", "Gets this entity's owner" )
|
||||
DEFINE_SCRIPTFUNC_NAMED( SetScriptOwnerEntity, "SetOwner", "Sets this entity's owner" )
|
||||
|
||||
DEFINE_SCRIPTFUNC_NAMED( ScriptGetGroundEntity, "GetGroundEntity", "Get the entity we're standing on." )
|
||||
DEFINE_SCRIPTFUNC_NAMED( ScriptSetGroundEntity, "SetGroundEntity", "Set the entity we're standing on." )
|
||||
|
||||
DEFINE_SCRIPTFUNC_NAMED( ScriptGetColorVector, "GetRenderColorVector", "Get the render color as a vector" )
|
||||
DEFINE_SCRIPTFUNC_NAMED( ScriptGetColorR, "GetRenderColorR", "Get the render color's R value" )
|
||||
DEFINE_SCRIPTFUNC_NAMED( ScriptGetColorG, "GetRenderColorG", "Get the render color's G value" )
|
||||
|
@ -288,6 +288,11 @@ public:
|
||||
HSCRIPT GetScriptOwnerEntity();
|
||||
virtual void SetScriptOwnerEntity(HSCRIPT pOwner);
|
||||
|
||||
#ifdef MAPBASE_VSCRIPT
|
||||
HSCRIPT ScriptGetGroundEntity();
|
||||
void ScriptSetGroundEntity( HSCRIPT hGroundEnt );
|
||||
#endif
|
||||
|
||||
HSCRIPT GetScriptInstance();
|
||||
|
||||
HSCRIPT m_hScriptInstance;
|
||||
|
@ -335,6 +335,8 @@ BEGIN_ENT_SCRIPTDESC( CBaseAnimating, CBaseEntity, "Animating models" )
|
||||
DEFINE_SCRIPTFUNC( FindBodygroupByName, "Finds a bodygroup by name" )
|
||||
DEFINE_SCRIPTFUNC( GetBodygroupCount, "Gets the number of models in a bodygroup" )
|
||||
DEFINE_SCRIPTFUNC( GetNumBodyGroups, "Gets the number of bodygroups" )
|
||||
DEFINE_SCRIPTFUNC( GetModelScale, "Gets the model's scale" )
|
||||
DEFINE_SCRIPTFUNC( SetModelScale, "Sets the model's scale with the specified change duration" )
|
||||
|
||||
DEFINE_SCRIPTFUNC( Dissolve, "Use 'sprites/blueglow1.vmt' for the default material, Time() for the default start time, false for npcOnly if you don't want it to check if the entity is a NPC first, 0 for the default dissolve type, Vector(0,0,0) for the default dissolver origin, and 0 for the default magnitude." )
|
||||
DEFINE_SCRIPTFUNC( Ignite, "'NPCOnly' only lets this fall through if the entity is a NPC and 'CalledByLevelDesigner' determines whether to treat this like the Ignite input or just an internal ignition call." )
|
||||
|
@ -2379,6 +2379,9 @@ BEGIN_ENT_SCRIPTDESC_ROOT( CBaseEntity, "Root class of all server-side entities"
|
||||
DEFINE_SCRIPTFUNC( GetContextCount, "Get the number of response contexts" )
|
||||
DEFINE_SCRIPTFUNC_NAMED( ScriptGetContextIndex, "GetContextIndex", "Get a response context at a specific index in the form of a table" )
|
||||
|
||||
DEFINE_SCRIPTFUNC_NAMED( ScriptGetGroundEntity, "GetGroundEntity", "Get the entity we're standing on." )
|
||||
DEFINE_SCRIPTFUNC_NAMED( ScriptSetGroundEntity, "SetGroundEntity", "Set the entity we're standing on." )
|
||||
|
||||
DEFINE_SCRIPTFUNC_NAMED( ScriptFollowEntity, "FollowEntity", "Begin following the specified entity. This makes this entity non-solid, parents it to the target entity, and teleports it to the specified entity's origin. The second parameter is whether or not to use bonemerging while following." )
|
||||
DEFINE_SCRIPTFUNC( StopFollowingEntity, "Stops following an entity if we're following one." )
|
||||
DEFINE_SCRIPTFUNC( IsFollowingEntity, "Returns true if this entity is following another entity." )
|
||||
|
@ -1446,6 +1446,11 @@ public:
|
||||
CBaseEntity *GetGroundEntity( void );
|
||||
CBaseEntity *GetGroundEntity( void ) const { return const_cast<CBaseEntity *>(this)->GetGroundEntity(); }
|
||||
|
||||
#ifdef MAPBASE_VSCRIPT
|
||||
HSCRIPT ScriptGetGroundEntity();
|
||||
void ScriptSetGroundEntity( HSCRIPT hGroundEnt );
|
||||
#endif
|
||||
|
||||
// Gets the velocity we impart to a player standing on us
|
||||
virtual void GetGroundVelocityToApply( Vector &vecGroundVel ) { vecGroundVel = vec3_origin; }
|
||||
|
||||
|
@ -2736,6 +2736,18 @@ void CBaseEntity::SetScriptOwnerEntity(HSCRIPT pOwner)
|
||||
SetOwnerEntity(ToEnt(pOwner));
|
||||
}
|
||||
|
||||
#ifdef MAPBASE_VSCRIPT
|
||||
HSCRIPT CBaseEntity::ScriptGetGroundEntity()
|
||||
{
|
||||
return ToHScript( m_hGroundEntity.Get() );
|
||||
}
|
||||
|
||||
void CBaseEntity::ScriptSetGroundEntity( HSCRIPT hGroundEnt )
|
||||
{
|
||||
SetGroundEntity( ToEnt( hGroundEnt ) );
|
||||
}
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------
|
||||
const Vector& CBaseEntity::ScriptGetColorVector()
|
||||
|
Loading…
x
Reference in New Issue
Block a user