Change TakeDamageInfo::FinalDamage from int to float (#4359)
Closes #4357
This commit is contained in:
@@ -57,7 +57,7 @@ struct TakeDamageInfo
|
||||
eDamageType DamageType; // Where does the damage come from? Being hit / on fire / contact with cactus / ...
|
||||
cEntity * Attacker; // The attacking entity; valid only for dtAttack
|
||||
int RawDamage; // What damage would the receiver get without any armor. Usually: attacker mob type + weapons
|
||||
int FinalDamage; // What actual damage will be received. Usually: m_RawDamage minus armor
|
||||
float FinalDamage; // What actual damage will be received. Usually: m_RawDamage minus armor
|
||||
Vector3d Knockback; // The amount and direction of knockback received from the damage
|
||||
// TODO: Effects - list of effects that the hit is causing. Unknown representation yet
|
||||
} ;
|
||||
@@ -279,7 +279,7 @@ public:
|
||||
void TakeDamage(eDamageType a_DamageType, UInt32 a_Attacker, int a_RawDamage, double a_KnockbackAmount);
|
||||
|
||||
/** Makes this entity take the specified damage. The values are packed into a TDI, knockback calculated, then sent through DoTakeDamage() */
|
||||
void TakeDamage(eDamageType a_DamageType, cEntity * a_Attacker, int a_RawDamage, int a_FinalDamage, double a_KnockbackAmount);
|
||||
void TakeDamage(eDamageType a_DamageType, cEntity * a_Attacker, int a_RawDamage, float a_FinalDamage, double a_KnockbackAmount);
|
||||
|
||||
float GetGravity(void) const { return m_Gravity; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user