X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fg_damage.qh;h=9c4983fee1b7d34c28483d8743b75dee015e7a69;hb=eaf526ab1006ff1439082ecc7b73795cd9de9027;hp=e2c5ea2b35d7a3f665df6a222cb9535e599c1c98;hpb=eac60648c4017e495060dd3ba9e50ac4bad5000a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/g_damage.qh b/qcsrc/server/g_damage.qh index e2c5ea2b3..9c4983fee 100644 --- a/qcsrc/server/g_damage.qh +++ b/qcsrc/server/g_damage.qh @@ -3,11 +3,13 @@ #if defined(CSQC) #elif defined(MENUQC) #elif defined(SVQC) + #include + #include #include #include #include #include - #include + #include #include "weapons/accuracy.qh" #include "weapons/csqcprojectile.qh" #include "weapons/selection.qh" @@ -17,7 +19,7 @@ #include "defs.qh" #include #include - #include "mutators/all.qh" + #include "mutators/_mod.qh" #include #include #include @@ -52,12 +54,11 @@ float damage_gooddamage; float IsFlying(entity a); -void UpdateFrags(entity player, float f); +void UpdateFrags(entity player, int f); // NOTE: f=0 means still count as a (positive) kill, but count no frags for it -void W_SwitchWeapon_Force(Player this, Weapon w); -entity GiveFrags_randomweapons; -void GiveFrags (entity attacker, entity targ, float f, int deathtype); +void W_SwitchWeapon_Force(Player this, Weapon w, .entity weaponentity); +void GiveFrags (entity attacker, entity targ, float f, int deathtype, .entity weaponentity); string AppendItemcodes(string s, entity player); @@ -78,7 +79,7 @@ float Obituary_WeaponDeath( string s1, string s2, string s3, float f1, float f2); -void Obituary(entity attacker, entity inflictor, entity targ, int deathtype); +void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .entity weaponentity); void Ice_Think(entity this); @@ -86,18 +87,14 @@ void Freeze (entity targ, float freeze_time, float frozen_type, float show_waypo void Unfreeze (entity targ); -// these are updated by each Damage call for use in button triggering and such -entity damage_targ; -entity damage_inflictor; -entity damage_attacker; - -void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force); +// NOTE: the .weaponentity parameter can be set to DMG_NOWEP if the attack wasn't caused by a weapon or player +void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force); float RadiusDamage_running; -float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float inflictorselfdamage, float forceintensity, int deathtype, entity directhitentity); +float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float inflictorselfdamage, float forceintensity, int deathtype, .entity weaponentity, entity directhitentity); // Returns total damage applies to creatures -float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype, entity directhitentity); +float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype, .entity weaponentity, entity directhitentity); .float fire_damagepersec; .float fire_endtime;