CTFRagdoll: Difference between revisions

From SigMod
Jump to navigation Jump to search
No edit summary
No edit summary
 
(22 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Overview==
==Overview==
Ragdolls in TF2 will be instances of this class.
Ragdolls in TF2 are instances of this class.


'''Source Location :''' '''/game/server/tf/tf_player.cpp'''
'''Source location : [https://github.com/sreechar/TF2-Source-Code/blob/master/tf2_src/game/server/tf/tf_player.cpp /game/server/tf/tf_player.cpp]'''


'''Linked entity : tf_ragdoll'''
'''Linked entity : [https://developer.valvesoftware.com/wiki/Tf_ragdoll tf_ragdoll]'''


==Class Structure==
==[[Classes|Class Structure]]==


*'''[[CBaseEntity]]'''
*'''[[CBaseEntity]]'''
Line 14: Line 14:


==SendProps==
==SendProps==
{| class="wikitable sortable" style="margin: auto; width: 100%;"
{| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;"
|+CTFRagdoll
|+CTFRagdoll
!Name
! style="width: 20%; background-color: #303030; color: white" |Name
!Type
! style="width: 20%; background-color: #303030; color: white" |Type
!Description
! style="width: 60%; background-color: #303030; color: white" |Description
|-
|-
|'''m_vecRagdollOrigin'''  
|'''m_vecRagdollOrigin'''
|Vector
|Vector
|
|The point in space at which the ragdoll was spawned (not where the client's view of it currently is).
|-
|-
|'''m_iPlayerIndex'''  
|'''m_iPlayerIndex'''
|Integer
|Integer
|
|The index of the player that the ragdoll was for.
|-
|-
|'''m_vecForce'''  
|'''m_vecForce'''
|Vector
|Vector
|
|
|-
|-
|'''m_vecRagdollVelocity'''  
|'''m_vecRagdollVelocity'''
|Vector
|Vector
|
|The velocity of the ragdoll's associated player when they died.
|-
|-
|'''m_nForceBone'''  
|'''m_nForceBone'''
|Integer
|Integer
|
|
|-
|-
|'''m_bGib'''  
|'''m_bGib'''
|Boolean
|Boolean
|
|Whether or not the player (and by extension the ragdoll) gibbed (exploded).
|-
|-
|'''m_bBurning'''  
|'''m_bBurning'''
|Boolean
|Boolean
|
|Whether or not the ragdoll is burning.
|-
|-
|'''m_bElectrocuted'''  
|'''m_bElectrocuted'''
|Boolean
|Boolean
|
|Whether or not the ragdoll was spawned due to a player death from energy weapons. (Neon Annihilator vs wet player, Cow Mangler, etc)
|-
|-
|'''m_bFeignDeath'''  
|'''m_bFeignDeath'''
|Boolean
|Boolean
|
|Whether or not the ragdoll was spawned from a Spy using the Dead Ringer.
|-
|-
|'''m_bWasDisguised'''  
|'''m_bWasDisguised'''
|Boolean
|Boolean
|
|Whether or not our player was disguised when they died.
|-
|-
|'''m_bBecomeAsh'''  
|'''m_bBecomeAsh'''
|Boolean
|Boolean
|
|Whether or not our player was killed by a weapon with item attribute ragdolls become ash
|-
|-
|'''m_bOnGround'''  
|'''m_bOnGround'''
|Boolean
|Boolean
|
|Whether or not the player was walking (on the ground) when the ragdoll was spawned. (Whether or not the client's view of the ragdoll is off the ground is irrelevant)
|-
|-
|'''m_bCloaked'''  
|'''m_bCloaked'''
|Boolean
|Boolean
|
|Whether or not the ragdoll is cloaked.
|-
|-
|'''m_iDamageCustom'''  
|'''m_iDamageCustom'''
|Integer
|Integer
|The type of damage that killed the ragdoll's associated player.
{| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;"
! colspan="1" |Values
|-
|
|
* 0 - TF_DMG_CUSTOM_NONE
* 1 - TF_DMG_CUSTOM_HEADSHOT
* 2 - TF_DMG_CUSTOM_BACKSTAB
* 3 - TF_DMG_CUSTOM_BURNING
* 4 - TF_DMG_WRENCH_FIX
* 5 - TF_DMG_CUSTOM_MINIGUN
* 6 - TF_DMG_CUSTOM_SUICIDE
* 7 - TF_DMG_CUSTOM_TAUNTATK_HADOUKEN
* 8 - TF_DMG_CUSTOM_BURNING_FLARE
* 9 - TF_DMG_CUSTOM_TAUNTATK_HIGH_NOON
* 10 - TF_DMG_CUSTOM_TAUNTATK_GRAND_SLAM
* 11 - TF_DMG_CUSTOM_PENETRATE_MY_TEAM
* 12 - TF_DMG_CUSTOM_PENETRATE_ALL_PLAYERS
* 13 - TF_DMG_CUSTOM_TAUNTATK_FENCING
* 14 - TF_DMG_CUSTOM_PENETRATE_NONBURNING_TEAMMATE
* 15 - TF_DMG_CUSTOM_TAUNTATK_ARROW_STAB
* 16 - TF_DMG_CUSTOM_TELEFRAG
* 17 - TF_DMG_CUSTOM_BURNING_ARROW
* 18 - TF_DMG_CUSTOM_FLYINGBURN
* 19 - TF_DMG_CUSTOM_PUMPKIN_BOMB
* 20 - TF_DMG_CUSTOM_DECAPITATION
* 21 - TF_DMG_CUSTOM_TAUNTATK_GRENADE
* 22 - TF_DMG_CUSTOM_BASEBALL
* 23 - TF_DMG_CUSTOM_CHARGE_IMPACT
* 24 - TF_DMG_CUSTOM_TAUNTATK_BARBARIAN_SWING
* 25 - TF_DMG_CUSTOM_AIR_STICKY_BURST
* 26 - TF_DMG_CUSTOM_DEFENSIVE_STICKY
* 27 - TF_DMG_CUSTOM_PICKAXE
* 28 - TF_DMG_CUSTOM_ROCKET_DIRECTHIT
* 29 - TF_DMG_CUSTOM_TAUNTATK_UBERSLICE
* 30 - TF_DMG_CUSTOM_PLAYER_SENTRY
* 31 - TF_DMG_CUSTOM_STANDARD_STICKY
* 32 - TF_DMG_CUSTOM_SHOTGUN_REVENGE_CRIT
* 33 - TF_DMG_CUSTOM_TAUNTATK_ENGINEER_GUITAR_SMASH
* 34 - TF_DMG_CUSTOM_BLEEDING
* 35 - TF_DMG_CUSTOM_GOLD_WRENCH
* 36 - TF_DMG_CUSTOM_CARRIED_BUILDING
* 37 - TF_DMG_CUSTOM_COMBO_PUNCH
* 38 - TF_DMG_CUSTOM_TAUNTATK_ENGINEER_ARM_KILL
* 39 - TF_DMG_CUSTOM_FISH_KILL
* 40 - TF_DMG_CUSTOM_TRIGGER_HURT
* 41 - TF_DMG_CUSTOM_DECAPITATION_BOSS
* 42 - TF_DMG_CUSTOM_STICKBOMB_EXPLOSION
* 43 - TF_DMG_CUSTOM_AEGIS_ROUND
* 44 - TF_DMG_CUSTOM_FLARE_EXPLOSION
* 45 - TF_DMG_CUSTOM_BOOTS_STOMP
* 46 - TF_DMG_CUSTOM_PLASMA
* 47 - TF_DMG_CUSTOM_PLASMA_CHARGED
* 48 - TF_DMG_CUSTOM_PLASMA_GIB
* 49 - TF_DMG_CUSTOM_PRACTICE_STICKY
* 50 - TF_DMG_CUSTOM_EYEBALL_ROCKET
* 51 - TF_DMG_CUSTOM_HEADSHOT_DECAPITATION
* 52 - TF_DMG_CUSTOM_TAUNTATK_ARMAGEDDON
* 53 - TF_DMG_CUSTOM_FLARE_PELLET
* 54 - TF_DMG_CUSTOM_CLEAVER
* 55 - TF_DMG_CUSTOM_CLEAVER_CRIT
* 56 - TF_DMG_CUSTOM_SAPPER_RECORDER_DEATH
* 57 - TF_DMG_CUSTOM_MERASMUS_PLAYER_BOMB
* 58 - TF_DMG_CUSTOM_MERASMUS_GRENADE
* 59 - TF_DMG_CUSTOM_MERASMUS_ZAP
* 60 - TF_DMG_CUSTOM_MERASMUS_DECAPITATION
* 61 - TF_DMG_CUSTOM_CANNONBALL_PUSH
* 62 - TF_DMG_CUSTOM_TAUNTATK_ALLCLASS_GUITAR_RIFF
* 63 - TF_DMG_CUSTOM_THROWABLE
* 64 - TF_DMG_CUSTOM_THROWABLE_KILL
* 65 - TF_DMG_CUSTOM_SPELL_TELEPORT
* 66 - TF_DMG_CUSTOM_SPELL_SKELETON
* 67 - TF_DMG_CUSTOM_SPELL_MIRV
* 68 - TF_DMG_CUSTOM_SPELL_METEOR
* 69 - TF_DMG_CUSTOM_SPELL_LIGHTNING
* 70 - TF_DMG_CUSTOM_SPELL_FIREBALL
* 71 - TF_DMG_CUSTOM_SPELL_MONOCULUS
* 72 - TF_DMG_CUSTOM_SPELL_BLASTJUMP
* 73 - TF_DMG_CUSTOM_SPELL_BATS
* 74 - TF_DMG_CUSTOM_SPELL_TINY
* 75 - TF_DMG_CUSTOM_KART
* 76 - TF_DMG_CUSTOM_GIANT_HAMMER
* 77 - TF_DMG_CUSTOM_RUNE_REFLECT
|}
|-
|-
|'''m_iTeam'''  
|'''m_iTeam'''
|Integer
|Integer
|The team the ragdoll's associated player was when they died.
{| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;"
! colspan="1" |Values
|-
|
|
* 0 - None
* 1 - Spectator
* 2 - RED
* 3 - BLU
* 5 - Boss / Neutral
|}
|-
|-
|'''m_iClass'''  
|'''m_iClass'''
|Integer
|Integer
|The class the ragdoll's associated player was when they died.
{| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;"
! colspan="1" |Values
|-
|
|
* 0 - TF_CLASS_UNDEFINED
* 1 - TF_CLASS_SCOUT
* 2 - TF_CLASS_SNIPER
* 3 - TF_CLASS_SOLDIER
* 4 - TF_CLASS_DEMOMAN
* 5 - TF_CLASS_MEDIC
* 6 - TF_CLASS_HEAVYWEAPONS
* 7 - TF_CLASS_PYRO
* 8 - TF_CLASS_SPY
* 9 - TF_CLASS_ENGINEER
* 10 - TF_CLASS_CIVILIAN
* 11 - TF_CLASS_COUNT_ALL
* 12 - TF_CLASS_RANDOM
|}
|-
| colspan="3" style="padding: 0; margin: 0" |
{| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;"
! colspan="3" |m_hRagWearables
|-
| colspan="3" style="padding: 0; margin: 0" |
{| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;"
! colspan="3" |lengthproxy
|-
| style="width: 20%;" |'''lengthprop8'''
| style="width: 20%;" |Integer
| style="width: 60%;" |
|-
|-
|'''m_hRagWearables'''
| colspan="3" style="padding: 0 auto; margin: 0 auto;" |
|Array
{| class="wikitable" style="margin: 0 auto; width: 100%; padding: 0;"
|
! colspan="3" style="background-color: rgb(45, 62, 97)" |  
|}
|}
|}
{| class="wikitable sortable mw-collapsible mw-collapsed"
!Name
!Type
!Description
|-
|-
| style="width: 20%;" |'''000'''
| style="width: 20%;" |Integer
| style="width: 60%;" |CEconWearable Vector. Wearables taken from our player are stored here.
|-
|'''001'''
|Integer
|
|
|-
|'''002'''
|Integer
|
|
|-
|'''003'''
|Integer
|
|
|-
|-
|'''004'''
|Integer
|
|
|-
|'''005'''
|Integer
|
|
|-
|'''006'''
|Integer
|
|
|-
|-
|'''007'''
|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)" |
|}
|}
|-
|'''m_bGoldRagdoll'''
|Boolean
|Whether or not the ragdoll was turned to gold.
|-
|'''m_bIceRagdoll'''
|Boolean
|Whether or not the ragdoll was turned to ice.
|-
|'''m_bCritOnHardHit'''
|Boolean
|Whether or not the weapon that killed our player have item attribute crit on hard hit
|-
|'''m_flHeadScale'''
|Float
|The head scale of the ragdoll.
|-
|'''m_flTorsoScale'''
|Float
|The torso scale of the ragdoll.
|-
|'''m_flHandScale'''
|Float
|The hand scale of the ragdoll.
|}
|}
   '''m_hRagWearables''' (CTFRagdoll)
       '''lengthproxy''' (m_hRagWearables)
           '''lengthprop8''' (lengthproxy)
               Type: integer
               Description:
               ------------
                   ..?
       '''000''' (m_hRagWearables)
           Type: integer
           Description:
           ------------
               ..?
       '''001''' (m_hRagWearables)
           Type: integer
           Description:
           ------------
               ..?
       '''002''' (m_hRagWearables)
           Type: integer
           Description:
           ------------
               ..?
       '''003''' (m_hRagWearables)
           Type: integer
           Description:
           ------------
               ..?
       '''004''' (m_hRagWearables)
           Type: integer
           Description:
           ------------
               ..?
       '''005''' (m_hRagWearables)
           Type: integer
           Description:
           ------------
               ..?
       '''006''' (m_hRagWearables)
           Type: integer
           Description:
           ------------
               ..?
       '''007''' (m_hRagWearables)
           Type: integer
           Description:
           ------------
               ..?
   '''m_bGoldRagdoll''' (CTFRagdoll)
       Type: boolean
       Description:
       ------------
           ..?
   '''m_bIceRagdoll''' (CTFRagdoll)
       Type: boolean
       Description:
       ------------
           ..?
   '''m_bCritOnHardHit''' (CTFRagdoll)
       Type: boolean
       Description:
       ------------
           ..?
   '''m_flHeadScale''' (CTFRagdoll)
       Type: float
       Description:
       ------------
           ..?
   '''m_flTorsoScale''' (CTFRagdoll)
       Type: float
       Description:
       ------------
           ..?
   '''m_flHandScale''' (CTFRagdoll)
       Type: float
       Description:
       ------------
           ..?

Latest revision as of 19:28, 7 October 2023

Overview[edit | edit source]

Ragdolls in TF2 are instances of this class.

Source location : /game/server/tf/tf_player.cpp

Linked entity : tf_ragdoll

Class Structure[edit | edit source]

SendProps[edit | edit source]

CTFRagdoll
Name Type Description
m_vecRagdollOrigin Vector The point in space at which the ragdoll was spawned (not where the client's view of it currently is).
m_iPlayerIndex Integer The index of the player that the ragdoll was for.
m_vecForce Vector
m_vecRagdollVelocity Vector The velocity of the ragdoll's associated player when they died.
m_nForceBone Integer
m_bGib Boolean Whether or not the player (and by extension the ragdoll) gibbed (exploded).
m_bBurning Boolean Whether or not the ragdoll is burning.
m_bElectrocuted Boolean Whether or not the ragdoll was spawned due to a player death from energy weapons. (Neon Annihilator vs wet player, Cow Mangler, etc)
m_bFeignDeath Boolean Whether or not the ragdoll was spawned from a Spy using the Dead Ringer.
m_bWasDisguised Boolean Whether or not our player was disguised when they died.
m_bBecomeAsh Boolean Whether or not our player was killed by a weapon with item attribute ragdolls become ash
m_bOnGround Boolean Whether or not the player was walking (on the ground) when the ragdoll was spawned. (Whether or not the client's view of the ragdoll is off the ground is irrelevant)
m_bCloaked Boolean Whether or not the ragdoll is cloaked.
m_iDamageCustom Integer The type of damage that killed the ragdoll's associated player.
Values
  • 0 - TF_DMG_CUSTOM_NONE
  • 1 - TF_DMG_CUSTOM_HEADSHOT
  • 2 - TF_DMG_CUSTOM_BACKSTAB
  • 3 - TF_DMG_CUSTOM_BURNING
  • 4 - TF_DMG_WRENCH_FIX
  • 5 - TF_DMG_CUSTOM_MINIGUN
  • 6 - TF_DMG_CUSTOM_SUICIDE
  • 7 - TF_DMG_CUSTOM_TAUNTATK_HADOUKEN
  • 8 - TF_DMG_CUSTOM_BURNING_FLARE
  • 9 - TF_DMG_CUSTOM_TAUNTATK_HIGH_NOON
  • 10 - TF_DMG_CUSTOM_TAUNTATK_GRAND_SLAM
  • 11 - TF_DMG_CUSTOM_PENETRATE_MY_TEAM
  • 12 - TF_DMG_CUSTOM_PENETRATE_ALL_PLAYERS
  • 13 - TF_DMG_CUSTOM_TAUNTATK_FENCING
  • 14 - TF_DMG_CUSTOM_PENETRATE_NONBURNING_TEAMMATE
  • 15 - TF_DMG_CUSTOM_TAUNTATK_ARROW_STAB
  • 16 - TF_DMG_CUSTOM_TELEFRAG
  • 17 - TF_DMG_CUSTOM_BURNING_ARROW
  • 18 - TF_DMG_CUSTOM_FLYINGBURN
  • 19 - TF_DMG_CUSTOM_PUMPKIN_BOMB
  • 20 - TF_DMG_CUSTOM_DECAPITATION
  • 21 - TF_DMG_CUSTOM_TAUNTATK_GRENADE
  • 22 - TF_DMG_CUSTOM_BASEBALL
  • 23 - TF_DMG_CUSTOM_CHARGE_IMPACT
  • 24 - TF_DMG_CUSTOM_TAUNTATK_BARBARIAN_SWING
  • 25 - TF_DMG_CUSTOM_AIR_STICKY_BURST
  • 26 - TF_DMG_CUSTOM_DEFENSIVE_STICKY
  • 27 - TF_DMG_CUSTOM_PICKAXE
  • 28 - TF_DMG_CUSTOM_ROCKET_DIRECTHIT
  • 29 - TF_DMG_CUSTOM_TAUNTATK_UBERSLICE
  • 30 - TF_DMG_CUSTOM_PLAYER_SENTRY
  • 31 - TF_DMG_CUSTOM_STANDARD_STICKY
  • 32 - TF_DMG_CUSTOM_SHOTGUN_REVENGE_CRIT
  • 33 - TF_DMG_CUSTOM_TAUNTATK_ENGINEER_GUITAR_SMASH
  • 34 - TF_DMG_CUSTOM_BLEEDING
  • 35 - TF_DMG_CUSTOM_GOLD_WRENCH
  • 36 - TF_DMG_CUSTOM_CARRIED_BUILDING
  • 37 - TF_DMG_CUSTOM_COMBO_PUNCH
  • 38 - TF_DMG_CUSTOM_TAUNTATK_ENGINEER_ARM_KILL
  • 39 - TF_DMG_CUSTOM_FISH_KILL
  • 40 - TF_DMG_CUSTOM_TRIGGER_HURT
  • 41 - TF_DMG_CUSTOM_DECAPITATION_BOSS
  • 42 - TF_DMG_CUSTOM_STICKBOMB_EXPLOSION
  • 43 - TF_DMG_CUSTOM_AEGIS_ROUND
  • 44 - TF_DMG_CUSTOM_FLARE_EXPLOSION
  • 45 - TF_DMG_CUSTOM_BOOTS_STOMP
  • 46 - TF_DMG_CUSTOM_PLASMA
  • 47 - TF_DMG_CUSTOM_PLASMA_CHARGED
  • 48 - TF_DMG_CUSTOM_PLASMA_GIB
  • 49 - TF_DMG_CUSTOM_PRACTICE_STICKY
  • 50 - TF_DMG_CUSTOM_EYEBALL_ROCKET
  • 51 - TF_DMG_CUSTOM_HEADSHOT_DECAPITATION
  • 52 - TF_DMG_CUSTOM_TAUNTATK_ARMAGEDDON
  • 53 - TF_DMG_CUSTOM_FLARE_PELLET
  • 54 - TF_DMG_CUSTOM_CLEAVER
  • 55 - TF_DMG_CUSTOM_CLEAVER_CRIT
  • 56 - TF_DMG_CUSTOM_SAPPER_RECORDER_DEATH
  • 57 - TF_DMG_CUSTOM_MERASMUS_PLAYER_BOMB
  • 58 - TF_DMG_CUSTOM_MERASMUS_GRENADE
  • 59 - TF_DMG_CUSTOM_MERASMUS_ZAP
  • 60 - TF_DMG_CUSTOM_MERASMUS_DECAPITATION
  • 61 - TF_DMG_CUSTOM_CANNONBALL_PUSH
  • 62 - TF_DMG_CUSTOM_TAUNTATK_ALLCLASS_GUITAR_RIFF
  • 63 - TF_DMG_CUSTOM_THROWABLE
  • 64 - TF_DMG_CUSTOM_THROWABLE_KILL
  • 65 - TF_DMG_CUSTOM_SPELL_TELEPORT
  • 66 - TF_DMG_CUSTOM_SPELL_SKELETON
  • 67 - TF_DMG_CUSTOM_SPELL_MIRV
  • 68 - TF_DMG_CUSTOM_SPELL_METEOR
  • 69 - TF_DMG_CUSTOM_SPELL_LIGHTNING
  • 70 - TF_DMG_CUSTOM_SPELL_FIREBALL
  • 71 - TF_DMG_CUSTOM_SPELL_MONOCULUS
  • 72 - TF_DMG_CUSTOM_SPELL_BLASTJUMP
  • 73 - TF_DMG_CUSTOM_SPELL_BATS
  • 74 - TF_DMG_CUSTOM_SPELL_TINY
  • 75 - TF_DMG_CUSTOM_KART
  • 76 - TF_DMG_CUSTOM_GIANT_HAMMER
  • 77 - TF_DMG_CUSTOM_RUNE_REFLECT
m_iTeam Integer The team the ragdoll's associated player was when they died.
Values
  • 0 - None
  • 1 - Spectator
  • 2 - RED
  • 3 - BLU
  • 5 - Boss / Neutral
m_iClass Integer The class the ragdoll's associated player was when they died.
Values
  • 0 - TF_CLASS_UNDEFINED
  • 1 - TF_CLASS_SCOUT
  • 2 - TF_CLASS_SNIPER
  • 3 - TF_CLASS_SOLDIER
  • 4 - TF_CLASS_DEMOMAN
  • 5 - TF_CLASS_MEDIC
  • 6 - TF_CLASS_HEAVYWEAPONS
  • 7 - TF_CLASS_PYRO
  • 8 - TF_CLASS_SPY
  • 9 - TF_CLASS_ENGINEER
  • 10 - TF_CLASS_CIVILIAN
  • 11 - TF_CLASS_COUNT_ALL
  • 12 - TF_CLASS_RANDOM
m_hRagWearables
lengthproxy
lengthprop8 Integer
000 Integer CEconWearable Vector. Wearables taken from our player are stored here.
001 Integer
002 Integer
003 Integer
004 Integer
005 Integer
006 Integer
007 Integer
m_bGoldRagdoll Boolean Whether or not the ragdoll was turned to gold.
m_bIceRagdoll Boolean Whether or not the ragdoll was turned to ice.
m_bCritOnHardHit Boolean Whether or not the weapon that killed our player have item attribute crit on hard hit
m_flHeadScale Float The head scale of the ragdoll.
m_flTorsoScale Float The torso scale of the ragdoll.
m_flHandScale Float The hand scale of the ragdoll.