Limited support
This feature is only present in Portal 2: Community Edition and Portal: Revolution.

CTakeDamageInfo

AddDamage

Adds to the damage.

void CTakeDamageInfo::AddDamage(float additional)

AddDamageType

Adds to the damage type.

void CTakeDamageInfo::AddDamageType(int extraDamageType)

BaseDamageIsValid

Checks if the base damage is valid.

bool CTakeDamageInfo::BaseDamageIsValid()

GetAmmoName

Gets the name of the ammo which caused damage. This can be an ammo name, classname for physics objects, or a model name if thrown by the Gravity Gun.

string CTakeDamageInfo::GetAmmoName()

GetAmmoType

Gets the ammo type.

int CTakeDamageInfo::GetAmmoType()

GetAttacker

Gets the attacker, which is the ultimate cause of damage.

handle CTakeDamageInfo::GetAttacker()

GetBaseDamage

Gets the base damage.

float CTakeDamageInfo::GetBaseDamage()

GetDamage

Gets the damage.

float CTakeDamageInfo::GetDamage()

GetDamageCustom

Gets the damage custom.

int CTakeDamageInfo::GetDamageCustom()

GetDamageForce

Gets the damage force.

Vector CTakeDamageInfo::GetDamageForce()

GetDamagePosition

Gets the damage position.

Vector CTakeDamageInfo::GetDamagePosition()

GetDamageStats

Gets the damage stats.

int CTakeDamageInfo::GetDamageStats()

GetDamageType

Gets the damage type.

int CTakeDamageInfo::GetDamageType()

GetDamagedOtherPlayers

Gets whether other players have been damaged.

int CTakeDamageInfo::GetDamagedOtherPlayers()

GetInflictor

Gets the inflictor, which is the direct cause of damage like a grenade or zombie.

handle CTakeDamageInfo::GetInflictor()

GetMaxDamage

Gets the max damage.

float CTakeDamageInfo::GetMaxDamage()

GetReportedPosition

Gets the reported damage position.

Vector CTakeDamageInfo::GetReportedPosition()

GetWeapon

Gets the weapon.

handle CTakeDamageInfo::GetWeapon()

ScaleDamage

Scales the damage.

void CTakeDamageInfo::ScaleDamage(float factor)

ScaleDamageForce

Scales the damage force.

void CTakeDamageInfo::ScaleDamageForce(float factor)

SetAmmoType

Sets the ammo type.

void CTakeDamageInfo::SetAmmoType(int ammoType)

SetAttacker

Sets the attacker.

void CTakeDamageInfo::SetAttacker(entity attacker)

SetDamage

Sets the damage.

void CTakeDamageInfo::SetDamage(float damage)

SetDamageCustom

Sets the damage custom.

void CTakeDamageInfo::SetDamageCustom(int custType)

SetDamageForce

Sets the damage force.

void CTakeDamageInfo::SetDamageForce(Vector force)

SetDamagePosition

Sets the damage position.

void CTakeDamageInfo::SetDamagePosition(Vector position)

SetDamageStats

Sets the damage stats.

void CTakeDamageInfo::SetDamageStats(int stats)

SetDamageType

Sets the damage type.

void CTakeDamageInfo::SetDamageType(int damageType)

SetDamagedOtherPlayers

Sets whether other players have been damaged.

void CTakeDamageInfo::SetDamagedOtherPlayers(int count)

SetInflictor

Sets the inflictor.

void CTakeDamageInfo::SetInflictor(entity inflictor)

SetMaxDamage

Sets the max damage.

void CTakeDamageInfo::SetMaxDamage(float maxDamage)

SetReportedPosition

Sets the reported damage position.

void CTakeDamageInfo::SetReportedPosition(Vector position)

SetWeapon

Sets the weapon.

void CTakeDamageInfo::SetWeapon(entity weapon)

SubtractDamage

Removes from the damage.

void CTakeDamageInfo::SubtractDamage(float remove)