Editing CBaseCombatCharacter

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
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 22: Line 20:
|'''m_bGlowEnabled'''
|'''m_bGlowEnabled'''
|Boolean
|Boolean
|Whether or not to render a team colored outline around this entity.
|
|-
|-
| colspan="3" style="padding: 0; margin: 0;" |
| colspan="3" style="padding: 0; margin: 0;" |
Line 30: Line 28:
| style="width: 50%;" |'''m_flNextAttack'''
| style="width: 50%;" |'''m_flNextAttack'''
| style="width: 15%;" |Float
| style="width: 15%;" |Float
| style="width: 35%;" |A timestamp for when this entity is ready to attack. (Weapon switches modify this time.)
| style="width: 35%;" |
|-
| colspan="3" style="padding: 0 auto; margin: 0 auto;" |
{| class="wikitable" style="margin: 0 auto; width: 100%; padding: 0;"
! colspan="3" style="background-color: rgb(45, 62, 97)" |
|}
|}
|}
|-
|-
|'''m_hActiveWeapon'''
|'''m_hActiveWeapon'''
|Handle
|Integer
|The weapon this entity is currently using.
|
|-
|-
| colspan="3" style="padding: 0; margin: 0;" |
| colspan="3" style="padding: 0; margin: 0;" |
Line 48: Line 41:
| style="width: 50%;" |'''000'''
| style="width: 50%;" |'''000'''
| style="width: 15%;" |Integer
| style="width: 15%;" |Integer
| style="width: 35%;" |An array of weapon handles this entity posesses
| style="width: 35%;" |
|-
|-
|'''001'''
|'''001'''
Line 237: Line 230:
|Integer
|Integer
|
|
|-
| colspan="3" style="padding: 0 auto; margin: 0 auto;" |
{| class="wikitable" style="margin: 0 auto; width: 100%; padding: 0;"
! colspan="3" style="background-color: rgb(45, 62, 97)" |
|}
|}
|}
|}
|}
Line 253: Line 241:
|-
|-
| style="width: 50%;" |'''InputKilledNPC'''
| style="width: 50%;" |'''InputKilledNPC'''
| style="width: 15%;" |Input (Void)
| style="width: 15%;" |
| style="width: 35%;" |
| style="width: 35%;" |
|-
|-
| style="width: 50%;" |'''m_CurrentWeaponProficiency'''
| style="width: 50%;" |'''m_CurrentWeaponProficiency'''
| style="width: 15%;" |Integer
| style="width: 15%;" |
| style="width: 35%;" |Used in HL2 to determine how "good" this entity is at using it's weapon. (It affects bullet spread)
| style="width: 35%;" |
{| 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/weapon_proficiency.h#L20 /game/shared/weapon_proficiency.h#L20]
* <span style="color: #66b1fa">0</span> - WEAPON_PROFICIENCY_POOR
* <span style="color: #66b1fa">1</span> - WEAPON_PROFICIENCY_AVERAGE
* <span style="color: #66b1fa">2</span> - WEAPON_PROFICIENCY_GOOD
* <span style="color: #66b1fa">3</span> - WEAPON_PROFICIENCY_VERY_GOOD
* <span style="color: #66b1fa">4</span> - WEAPON_PROFICIENCY_PERFECT
|}
|-
|-
| style="width: 50%;" |'''m_HackedGunPos'''
| style="width: 50%;" |'''m_HackedGunPos'''
| style="width: 15%;" |Vector
| style="width: 15%;" |
| style="width: 35%;" |
| style="width: 35%;" |
|-
|-
| style="width: 50%;" |'''m_LastHitGroup'''
| style="width: 50%;" |'''m_LastHitGroup'''
| style="width: 15%;" |Integer
| style="width: 15%;" |
| style="width: 35%;" |The last body region that took damage.
| style="width: 35%;" |
{| 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/shareddefs.h#L335 /game/shared/shareddefs.h#L335]
* <span style="color: #66b1fa">0</span> - HITGROUP_GENERIC
* <span style="color: #66b1fa">1</span> - HITGROUP_HEAD
* <span style="color: #66b1fa">2</span> - HITGROUP_CHEST
* <span style="color: #66b1fa">3</span> - HITGROUP_STOMACH
* <span style="color: #66b1fa">4</span> - HITGROUP_LEFTARM
* <span style="color: #66b1fa">5</span> - HITGROUP_RIGHTARM
* <span style="color: #66b1fa">6</span> - HITGROUP_LEFTLEG
* <span style="color: #66b1fa">7</span> - HITGROUP_RIGHTLEG
* <span style="color: #66b1fa">10</span> - HITGROUP_GEAR
|}
|-
|-
| style="width: 50%;" |'''m_Relationship'''
| style="width: 50%;" |'''m_Relationship'''
| style="width: 15%;" |Array (Handle)
| style="width: 15%;" |
| style="width: 35%;" |Array of Relationships.
| style="width: 35%;" |
|-
|-
| style="width: 50%;" |'''m_RelationshipString'''
| style="width: 50%;" |'''m_RelationshipString'''
| style="width: 15%;" |String
| style="width: 15%;" |
| style="width: 35%;" |Used to load relationship keyvalues
| style="width: 35%;" |
|-
|-
| style="width: 50%;" |'''m_bForceServerRagdoll'''
| style="width: 50%;" |'''m_bForceServerRagdoll'''
| style="width: 15%;" |Boolean
| style="width: 15%;" |
| style="width: 35%;" |
| style="width: 35%;" |
|-
|-
| style="width: 50%;" |'''m_bPreventWeaponPickup'''
| style="width: 50%;" |'''m_bPreventWeaponPickup'''
| style="width: 15%;" |Boolean
| style="width: 15%;" |
| style="width: 35%;" |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.
| style="width: 35%;" |
|-
|-
| style="width: 50%;" |'''m_bloodColor'''
| style="width: 50%;" |'''m_bloodColor'''
| style="width: 15%;" |Integer
| style="width: 15%;" |
| style="width: 35%;" |The color of this entity's blood particles.
| style="width: 35%;" |
|-
|-
| style="width: 50%;" |'''m_eHull'''
| style="width: 50%;" |'''m_eHull'''
| style="width: 15%;" |Integer
| style="width: 15%;" |
| style="width: 35%;" |Nav hull type.
| style="width: 35%;" |
{| 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/server/ai_hull.h#L14 /game/server/ai_hull.h#L14]
* <span style="color: #66b1fa">0</span> - HULL_HUMAN (Combine, Stalker, Zombie...)
* <span style="color: #66b1fa">1</span> - HULL_SMALL_CENTERED (Scanner)
* <span style="color: #66b1fa">2</span> - HULL_WIDE_HUMAN (Vortigaunt)
* <span style="color: #66b1fa">3</span> - HULL_TINY (Headcrab)
* <span style="color: #66b1fa">4</span> - HULL_WIDE_SHORT (Bullsquid)
* <span style="color: #66b1fa">5</span> - HULL_MEDIUM (Cremator)
* <span style="color: #66b1fa">6</span> - HULL_TINY_CENTERED (Manhack)
* <span style="color: #66b1fa">7</span> - HULL_LARGE (Antlion Guard)
* <span style="color: #66b1fa">9</span> - HULL_LARGE_CENTERED (Mortar Synth)
* <span style="color: #66b1fa">10</span> - HULL_MEDIUM_TALL (Hunter)
* <span style="color: #66b1fa">12</span> - HULL_NONE (No Hull (appears after num hulls as we don't want to count it))
|}
|-
|-
| style="width: 50%;" |'''m_flDamageAccumulator'''
| style="width: 50%;" |'''m_flDamageAccumulator'''
| style="width: 15%;" |Float
| style="width: 15%;" |
| style="width: 35%;" |So very small amounts of damage do not get lost.
| style="width: 35%;" |
|-
|-
| style="width: 50%;" |'''m_flFieldOfView'''
| style="width: 50%;" |'''m_flFieldOfView'''
| style="width: 15%;" |Float
| style="width: 15%;" |
| style="width: 35%;" |Cosine of field of view for this character.
| style="width: 35%;" |
|-
|-
| style="width: 50%;" |'''m_flNextAttack'''
| style="width: 50%;" |'''m_flNextAttack'''
| style="width: 15%;" |Float
| style="width: 15%;" |
| style="width: 35%;" |A timestamp for when this entity is ready to attack. (Weapon switches modify this time.)
| style="width: 35%;" |
|-
|-
| style="width: 50%;" |'''m_hActiveWeapon'''
| style="width: 50%;" |'''m_hActiveWeapon'''
| style="width: 15%;" |Handle
| style="width: 15%;" |
| style="width: 35%;" |The weapon this entity currently has equipped
| style="width: 35%;" |
|-
|-
| style="width: 50%;" |'''m_hMyWeapons'''
| style="width: 50%;" |'''m_hMyWeapons'''
| style="width: 15%;" |Array (Handle)
| style="width: 15%;" |
| style="width: 35%;" |An array of weapons this entity possesses
| style="width: 35%;" |
|-
|-
| style="width: 50%;" |'''m_iAmmo'''
| style="width: 50%;" |'''m_iAmmo'''
| style="width: 15%;" |Array (Integer)
| style="width: 15%;" |
| style="width: 35%;" |Array of ammo amounts for each ammo type
| style="width: 35%;" |
|-
| style="width: 50%;" |'''m_iDamageCount'''
| style="width: 15%;" |
| style="width: 35%;" |
|-
| style="width: 50%;" |'''m_impactEnergyScale'''
| style="width: 15%;" |
| style="width: 35%;" |
|}
{| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;
|+[https://developer.valvesoftware.com/wiki/physics_cannister physics_cannister]
! style="width: 50%; background-color: #303030; color: white" |Name
! style="width: 15%; background-color: #303030; color: white" |Type
! style="width: 35%; background-color: #303030; color: white" |Description
|-
| style="width: 50%;" |'''CPhysicsCannisterBeginShutdownThink'''
| style="width: 15%;" |
| style="width: 35%;" |
|-
| style="width: 50%;" |'''CPhysicsCannisterExplodeTouch'''
| style="width: 15%;" |
| style="width: 35%;" |
|-
| style="width: 50%;" |'''InputActivate'''
| style="width: 15%;" |
| style="width: 35%;" |
|-
| style="width: 50%;" |'''InputDeactivate'''
| style="width: 15%;" |
| style="width: 35%;" |
|-
| style="width: 50%;" |'''InputExplode'''
| style="width: 15%;" |
| style="width: 35%;" |
|-
| style="width: 50%;" |'''InputWake'''
| style="width: 15%;" |
| style="width: 35%;" |
|-
| style="width: 50%;" |'''m_OnAwakened'''
| style="width: 15%;" |
| style="width: 35%;" |
|-
| style="width: 50%;" |'''m_activateTime'''
| style="width: 15%;" |
| style="width: 35%;" |
|-
| style="width: 50%;" |'''m_active'''
| style="width: 15%;" |
| style="width: 35%;" |
|-
| style="width: 50%;" |'''m_bFired'''
| style="width: 15%;" |
| style="width: 35%;" |
|-
| style="width: 50%;" |'''m_damage'''
| style="width: 15%;" |
| style="width: 35%;" |
|-
| style="width: 50%;" |'''m_damageRadius'''
| style="width: 15%;" |
| style="width: 35%;" |
|-
| style="width: 50%;" |'''m_flLastPhysicsInfluenceTime'''
| style="width: 15%;" |
| style="width: 35%;" |
|-
| style="width: 50%;" |'''m_gasSound'''
| style="width: 15%;" |
| style="width: 35%;" |
|-
| style="width: 50%;" |'''m_hLauncher'''
| style="width: 15%;" |
| style="width: 35%;" |
|-
| style="width: 50%;" |'''m_hPhysicsAttacker'''
| style="width: 15%;" |
| style="width: 35%;" |
|-
| style="width: 50%;" |'''m_onActivate'''
| style="width: 15%;" |
| style="width: 35%;" |
|-
| style="width: 50%;" |'''m_pController'''
| style="width: 15%;" |
| style="width: 35%;" |
|-
| style="width: 50%;" |'''m_pJet'''
| style="width: 15%;" |
| style="width: 35%;" |
|-
| style="width: 50%;" |'''m_thrustOrigin'''
| style="width: 15%;" |
| style="width: 35%;" |
|-
| style="width: 50%;" |'''m_thrustTime'''
| style="width: 15%;" |
| style="width: 35%;" |
|-
| colspan="3" style="padding: 0; margin: 0;" |
{| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;"
{| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;"
! colspan="1" |Values
! colspan="3" |m_thruster
|-
|-
|
| style="width: 50%;" |'''m_thrust'''
[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]
| style="width: 15%;" |
* <span style="color: #66b1fa">0</span> - TF_AMMO_DUMMY
| style="width: 35%;" |
* <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_thrustVector'''
| style="width: 15%;" |Integer
| style="width: 15%;" |
| style="width: 35%;" |How many times this entity has taken damage
| style="width: 35%;" |
|-
|-
| style="width: 50%;" |'''m_impactEnergyScale'''
| style="width: 50%;" |'''m_torqueVector'''
| style="width: 15%;" |Float
| style="width: 15%;" |
| style="width: 35%;" |Scale the amount of energy used to calculate damage this entity takes due to physics
| style="width: 35%;" |
|}
|}
|}
Please note that all contributions to SigMod are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see SigMod:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)