CBaseCombatCharacter: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
'''Source Location : [https://github.com/sreechar/TF2-Source-Code/blob/master/tf2_src/game/server/basecombatcharacter.h /game/server/basecombatcharacter.h]''' | '''Source Location : [https://github.com/sreechar/TF2-Source-Code/blob/master/tf2_src/game/server/basecombatcharacter.h /game/server/basecombatcharacter.h]''' | ||
'''VScript : [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Scripting/Script_Functions#CBaseCombatCharacter Script_Functions#CBaseCombatCharacter]''' | |||
==[[Classes|Class Structure]]== | ==[[Classes|Class Structure]]== | ||
Line 235: | Line 237: | ||
|Integer | |Integer | ||
| | | | ||
|- | |- | ||
| colspan="3" style="padding: 0 auto; margin: 0 auto;" | | | colspan="3" style="padding: 0 auto; margin: 0 auto;" | | ||
{| class="wikitable" style="margin: 0 auto; width: 100%; padding: 0;" | {| class="wikitable" style="margin: 0 auto; width: 100%; padding: 0;" | ||
! colspan="3" style="background-color: rgb(45, 62, 97)" | | ! colspan="3" style="background-color: rgb(45, 62, 97)" | | ||
|} | |||
|} | |} | ||
|} | |} | ||
Line 251: | Line 253: | ||
|- | |- | ||
| style="width: 50%;" |'''InputKilledNPC''' | | style="width: 50%;" |'''InputKilledNPC''' | ||
| style="width: 15%;" | | | style="width: 15%;" |Input (Void) | ||
| style="width: 35%;" | | | style="width: 35%;" | | ||
|- | |- | ||
Line 335: | Line 337: | ||
| style="width: 50%;" |'''m_flDamageAccumulator''' | | style="width: 50%;" |'''m_flDamageAccumulator''' | ||
| style="width: 15%;" |Float | | style="width: 15%;" |Float | ||
| style="width: 35%;" | | | style="width: 35%;" |So very small amounts of damage do not get lost. | ||
|- | |- | ||
| style="width: 50%;" |'''m_flFieldOfView''' | | style="width: 50%;" |'''m_flFieldOfView''' | ||
Line 355: | Line 357: | ||
| style="width: 50%;" |'''m_iAmmo''' | | style="width: 50%;" |'''m_iAmmo''' | ||
| style="width: 15%;" |Array (Integer) | | style="width: 15%;" |Array (Integer) | ||
| style="width: 35%;" | | | style="width: 35%;" |Array of ammo amounts for each ammo type | ||
{| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;" | |||
! colspan="1" |Values | |||
|- | |||
| | |||
[https://github.com/sr2echa/TF2-Source-Code/blob/master/tf2_src/game/shared/tf/tf_shareddefs.h#L351 /game/shared/tf/tf_shareddefs.h#L351] | |||
* <span style="color: #66b1fa">0</span> - TF_AMMO_DUMMY | |||
* <span style="color: #66b1fa">1</span> - TF_AMMO_PRIMARY | |||
* <span style="color: #66b1fa">2</span> - TF_AMMO_SECONDARY | |||
* <span style="color: #66b1fa">3</span> - TF_AMMO_METAL | |||
* <span style="color: #66b1fa">4</span> - TF_AMMO_GRENADES1 (Sandman / Wrap Assassin balls) | |||
* <span style="color: #66b1fa">5</span> - TF_AMMO_GRENADES2 (Cleavers) | |||
* <span style="color: #66b1fa">6</span> - TF_AMMO_GRENADES3 | |||
* <span style="color: #66b1fa">7</span> - TF_AMMO_COUNT | |||
|} | |||
|- | |- | ||
| style="width: 50%;" |'''m_iDamageCount''' | | style="width: 50%;" |'''m_iDamageCount''' |
Latest revision as of 19:31, 7 October 2023
Overview[edit | edit source]
Contains functionality common between NPCs and players.
Source Location : /game/server/basecombatcharacter.h
VScript : Script_Functions#CBaseCombatCharacter
Class Structure[edit | edit source]
- CBaseEntity
- CBaseAnimating
- CBaseAnimatingOverlay
- CBaseFlex
- CBaseCombatCharacter
- CBaseFlex
- CBaseAnimatingOverlay
- CBaseAnimating
SendProps[edit | edit source]
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
m_bGlowEnabled | Boolean | Whether or not to render a team colored outline around this entity. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
m_hActiveWeapon | Handle | The weapon this entity is currently using. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Entity DataMaps[edit | edit source]
Name | Type | Description | ||
---|---|---|---|---|
InputKilledNPC | Input (Void) | |||
m_CurrentWeaponProficiency | Integer | Used in HL2 to determine how "good" this entity is at using it's weapon. (It affects bullet spread)
| ||
m_HackedGunPos | Vector | |||
m_LastHitGroup | Integer | The last body region that took damage.
| ||
m_Relationship | Array (Handle) | Array of Relationships. | ||
m_RelationshipString | String | Used to load relationship keyvalues | ||
m_bForceServerRagdoll | Boolean | |||
m_bPreventWeaponPickup | Boolean | Is this entity allowed to acquire weapons? For players this doesn't just include picking up weapons off the ground, but also prevents weapons from being assigned on spawn or resupply. | ||
m_bloodColor | Integer | The color of this entity's blood particles. | ||
m_eHull | Integer | Nav hull type.
| ||
m_flDamageAccumulator | Float | So very small amounts of damage do not get lost. | ||
m_flFieldOfView | Float | Cosine of field of view for this character. | ||
m_flNextAttack | Float | A timestamp for when this entity is ready to attack. (Weapon switches modify this time.) | ||
m_hActiveWeapon | Handle | The weapon this entity currently has equipped | ||
m_hMyWeapons | Array (Handle) | An array of weapons this entity possesses | ||
m_iAmmo | Array (Integer) | Array of ammo amounts for each ammo type
| ||
m_iDamageCount | Integer | How many times this entity has taken damage | ||
m_impactEnergyScale | Float | Scale the amount of energy used to calculate damage this entity takes due to physics |