Gib class
Type: Reference type
Declaration | Description |
---|---|
CBaseEntity@ opImplCast() | Implicitly casts to base type. |
const Vector& GetOrigin() const | Gets the entity's (absolute) origin. |
void SetOrigin(const Vector& in vecOrigin) | Sets this entity's (absolute) origin |
bool KeyValue(const string& in szKeyName, const string& in szValue) | Sets keyvalue data on this entity |
void TraceAttack(entvars_t@ pevAttacker, float flDamage, const Vector& in vecDir, TraceResult& in traceResult, int bitsDamageType) | Traces an attack by the given entity to this entity. |
void TraceBleed(float flDamage, const Vector& in vecDir, TraceResult& in traceResult, int bitsDamageType) | Traces entity bleed event. |
int GiveAmmo(int iAmount, const string& in szName, int iMax, const bool fFromWeapon = true) | Gives ammo to this entity. |
bool HasTarget(const string& in szTarget) | Returns whether this entity has the given target. |
string TeamID() | Returns this entity's team ID. |
string GetClassname() const | Returns this entity's class name. |
string GetTargetname() const | Returns this entity's target name. |
bool FVisibleFromPos(const Vector& in vecTarget, const Vector& in vecStart) | Returns whether this entity is visible from the given position. |
string SOUNDREPLACEMENT_Find(const string& in szFilename) | Find sound replacement for the given file. |
int FindMonstersInWorld(array<CBaseEntity@>@ pArray, int flagMask) | Finds monsters in the world |
bool IsPlayerAlly() const | Returns whether this entity is allied to players. |
void SetPlayerAlly(bool fState) | Sets this entity's player ally status. |
void SetPlayerAllyDirect(bool fState) | Sets this entity's player ally status. Use this only if you need the setting to be exactly what you give it (e.g. when copying from another monster) |
bool opEquals(CBaseEntity@ pOther) | Compares 2 entities for equality. |
void Precache() | Precaches the entity. Do not call directly. |
int ObjectCaps() | Gets this entity's objects caps. See the FCAP enum. |
void SetObjectCollisionBox() | Sets up the object collision box. |
int GetClassification(int cl) | Gets this entity's classification. Returns the given value if none is set. See the CLASSIFICATION enum. |
const string& GetClassificationTag() | Gets this entity's classification tag. |
const string& GetClassificationName() | Gets this entity's classification name. |
void SetClassification(int cl) | Sets this entity's classification override. Can override the entity's player ally setting. |
void SetClassificationFromEntity(CBaseEntity@ pEntity) | Sets this entity's classification override to the classification override set on the given entity. Can override the entity's player ally setting. |
void ClearClassification() | Clears this entity's classification override. |
int IRelationship(CBaseEntity@ other, bool ignoreNoTarget = false) | Gets the relationship between this entity and the given entity. See the RELATIONSHIP enum. |
int IRelationshipByClass(CLASS iClass) | Gets the relationship between this entity and the given entity classification. See the RELATIONSHIP enum. |
int Classify() | Gets this entity's classification. |
int TakeDamage(entvars_t@ pevInflictor, entvars_t@ pevAttacker, float flDamage, int bitsDamageType) | Causes this entity to take damage. Returns 1 if it took damage, 0 otherwise. |
bool TakeHealth(float flHealth, int bitsDamageType, int health_cap = 0) | Takes health from this entity. Note: flHealth is added to entity health. Use negative values to subtract.If health_cap is non-zero, won't add more than health_cap. Returns true if it took damage, false otherwise. |
bool TakeArmor(float flArmor, int bitsDamageType, int armor_cap = 0) | Takes armor from this entity. Note: flArmor is added to entity armor. Use negative values to subtract.If armor_cap is non-zero, won't add more than armor_cap. Returns 1 if it took damage, 0 otherwise. |
void Killed(entvars_t@pevAtttacker, int iGibbed) | Tells this entity it's been killed. See the GIB enum for possible values. |
int BloodColor() | Returns the blood color. See the BLOOD_COLOR enum. |
bool IsTriggered(CBaseEntity@ pActivator) | Returns whether this entity is triggered by the given entity. |
CBaseMonster@ MyMonsterPointer() | Returns this entity as its monster entity, if it is a monster. |
CustomKeyvalues@ GetCustomKeyvalues() | Gets this entity's custom keyvalues. |
bool BlockedByEntity(CBaseEntity@ pOther, float flDamage) | Returns true if you should be blocked by the entity, false otherwise. Also deals blocking damage to the entity, if applicable. |
void SUB_Remove() | Think function. Delay-removes this entity. |
void SUB_DoNothing() | Think function. Explicitly does nothing. |
void SUB_StartFadeOut() | Think function. Starts fading this entity. |
void SUB_FadeOut() | Think function. Fades this entity. |
void SUB_CallUseToggle() | Think function. Calls use toggle on this entity. |
bool ShouldToggle(USE_TYPE useType, const bool currentState) | Returns whether this entity should toggle. |
void FireBullets(uint cShots, Vector vecSrc, Vector vecDirShooting, Vector vecSpread,float flDistance, Bullet iBulletType, int iTracerFreq = 4, int iDamage = 0, entvars_t@ pevAttacker = null, FireBulletsDrawMode fDraw = FBDM_DRAW) | Fires bullets. Must call CMath::MakeAimVectors with an angle vector first. |
void SUB_UseTargets(CBaseEntity@ pActivator, USE_TYPE useType, float flValue) | Calls use on targets. |
bool Intersects(CBaseEntity@ pOther) | Returns whether this entity intersects with the given entity. |
void MakeDormant() | Makes this entity dormant. |
bool IsDormant() | Returns whether this entity is dormant. |
bool IsLockedByMaster() | Returns whether this entity is locked by its master. |
edict_t@ edict() | Returns this entity's edict. |
int entindex() | Returns this entity's index. |
bool SetupModel() | Sets up the model. |
int GetToggleState() | Gets the toggle state. See the TOGGLE_STATE enum. |
void AddPoints(int score, const bool bAllowNegativeScore) | Adds points to this entity. |
void AddPointsToTeam(int score, const bool bAllowNegativeScore) | Adds points to this entity's team. |
AddPlayerItemResult AddPlayerItem(CBasePlayerItem@ pItem) | Adds the given player item to this entity. |
bool RemovePlayerItem(CBasePlayerItem@ pItem) | Removes the given player item to this entity. |
float GetDelay() | Gets this entity's trigger delay. |
bool IsMoving() | Returns whether this entity is moving. |
void OverrideReset() | Resets this entity. |
int DamageDecal(int bitsDamageType) | Returns the damage decal See decal_e. |
void SetToggleState(int state) | Sets this entity's toggle state. |
void StartSneaking() | Starts sneaking. |
void StopSneaking() | Stops sneaking. |
bool OnControls(entvars_t@ pev) | Reacts to controls set on the pev. |
bool IsSneaking() | Returns whether this entity is sneaking. |
bool IsAlive() | Returns whether this entity is alive. |
bool IsBSPModel() | Returns whether this entity is a BSP model. |
bool ReflectGauss() | Returns whether this entity reflects gauss shots. |
bool IsInWorld() | Returns whether this entity is in the world. |
bool IsMonster() | Returns whether this entity is a monster. |
bool IsPlayer() | Returns whether this entity is a player. |
bool IsNetClient() | Returns whether this is a net client. |
bool IsPointEnt() | Returns whether this is a point entity. |
bool IsBreakable() | Returns whether this is a breakable brush entity. |
bool IsMachine() | Returns whether this is a machine. |
bool CriticalRemove() | Removes this entity in critical situations. |
CBaseEntity@ GetNextTarget() | Gets the next target to trigger. |
void Think() | Makes this entity think. Do not call directly. |
void Touch(CBaseEntity@ pOther) | Triggers this entity's touch function. |
void Use(CBaseEntity@ pActivator, CBaseEntity@ pCaller, USE_TYPE useType, float flValue = 0.0f) | Trigger's this entity's use function. |
void Blocked(CBaseEntity@ pOther) | Triggers this entity's blocked function. |
void UpdateOnRemove() | Updates this entity when removed. |
CBaseEntity@ Respawn() | Respawns this entity. |
bool FBecomeProne(CBaseEntity@ pOther) | Makes this entity become prone. |
Vector Center() | Returns this entity's center. |
Vector EyePosition() | Returns this entity's eye position. |
Vector EarPosition() | Returns this entity's ear position. |
Vector BodyTarget(const Vector& in posSrc) | Returns this entity's body target for shooting. |
int Illumination() | Returns this entity's illumination. |
bool FVisible(CBaseEntity@ pEntity, bool fIgnoreGlass) | Returns whether this entity is visible to the given entity. |
bool FVisible(const Vector& in vecOrigin) | Returns whether this entity is visible from the given origin. |
bool IsFacing(entvars_t@ pevTest, float flDotProduct = VIEW_FIELD_ULTRA_NARROW) | Returns whether this entity is facing the given entity, within the given view field. |
float GetPointsForDamage(float flDamage) | Returns the points received for damage done. |
void GetDamagePoints(entvars_t@ pevAttacker, entvars_t@ pevInflictor, float flDamage) | Adds damage points to the inflicting entity. |
void OnCreate() | Entity constructor. |
void OnDestroy() | Entity destructor. |
bool IsRevivable() | Returns whether this entity is revivable at this time. |
void BeginRevive(float flTimeUntilRevive) | Prepares this entity for revival. flTimeUntilRevive is the time until the revive action completes. |
void EndRevive(float flTimeUntilRevive) | Called when this entity should be revived. flTimeUntilRevive is the time until the revival should start. |
dictionary@ GetUserData() | Gets the user data on this entity. Do not keep references to this data, the object might be removed from this entity. Only map scripts can use this. |
dictionaryValue& GetUserData(const string& in szKey) | Gets the user data stored under the specified key on this entity. Do not keep references to this data, the object might be removed from this entity. Only map scripts can use this. |
void ClearUserData() | Clears the user data on this entity. WARNING: clears all data. Only map scripts can use this. |
void Spawn(const string& in szModelName) | Spawns the gib with the given model. Note: this sets several of CGib's variables. Set variables after calling this. |
void LimitVelocity() | Limits the velocity of the gib |
Declaration | Description |
---|---|
entvars_t@ pev | Entity variables |
bool m_fOverrideClass | Whether this entity overrides the classification. |
int m_iClassSelection | The overridden classification. |
float m_flMaximumFadeWait | Maximum fade wait time. |
float m_flMaximumFadeWaitB | Maximum fade wait time B. |
bool m_fCanFadeStart | Whether fading can start. |
bool m_fCustomModel | Whether a custom model is used. |
Vector m_vecLastOrigin | Last origin vector |
string_t targetnameOutFilterType | Target name out filter type. |
string_t classnameOutFilterType | Class name out filter type. |
string_t targetnameInFilterType | Target name in filter type. |
string_t classnameInFilterType | Class name in filter type. |
int m_iOriginalRenderMode | Original render model. |
int m_iOriginalRenderFX | Original render FX. |
float m_flOriginalRenderAmount | Original render amount. |
Vector m_vecOriginalRenderColor | Original render color. |
int m_bloodColor | The color of the blood that is sprayed onto walls when the gib touches it. |
int m_cBloodDecals | Maximum number of blood decals this gib can spray. |
int m_material | Gib material type. One of the Materials enum values should be used here. |
float m_lifeTime | Lifetime of this gib, in seconds |