]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_damage.qc
Replace more `vector_[xyz]` with `vector.[xyz]`
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_damage.qc
index 0e35b0f7458f587482c7154b7f291e4ca9abd3df..60476213897854d537a9107f258b479bdd854d4c 100644 (file)
@@ -1,7 +1,31 @@
-.float dmg;
-.float dmg_edge;
-.float dmg_force;
-.float dmg_radius;
+#include "g_damage.qh"
+
+#if defined(CSQC)
+#elif defined(MENUQC)
+#elif defined(SVQC)
+    #include "../warpzonelib/common.qh"
+    #include "../common/constants.qh"
+    #include "../common/teams.qh"
+    #include "../common/util.qh"
+    #include "../common/weapons/weapons.qh"
+    #include "weapons/accuracy.qh"
+    #include "weapons/csqcprojectile.qh"
+    #include "weapons/selection.qh"
+    #include "t_items.qh"
+    #include "autocvars.qh"
+    #include "constants.qh"
+    #include "defs.qh"
+    #include "../common/notifications.qh"
+    #include "../common/deathtypes.qh"
+    #include "mutators/mutators_include.qh"
+    #include "tturrets/include/turrets_early.qh"
+    #include "vehicles/vehicles_def.qh"
+    #include "../csqcmodellib/sv_model.qh"
+    #include "../common/playerstats.qh"
+    #include "g_hook.qh"
+    #include "scores.qh"
+    #include "spawnpoints.qh"
+#endif
 
 float Damage_DamageInfo_SendEntity(entity to, float sf)
 {
@@ -42,20 +66,6 @@ void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad
        Net_LinkEntity(e, false, 0.2, Damage_DamageInfo_SendEntity);
 }
 
-float checkrules_firstblood;
-
-float yoda;
-float damage_goodhits;
-float damage_gooddamage;
-
-.float dmg_team;
-.float teamkill_complain;
-.float teamkill_soundtime;
-.entity teamkill_soundsource;
-.entity pusher;
-.float istypefrag;
-.float taunt_soundtime;
-
 float IsFlying(entity a)
 {
        if(a.flags & FL_ONGROUND)
@@ -73,9 +83,6 @@ void UpdateFrags(entity player, float f)
        PlayerTeamScore_AddScore(player, f);
 }
 
-// NOTE: f=0 means still count as a (positive) kill, but count no frags for it
-void W_SwitchWeapon_Force(entity e, float w);
-entity GiveFrags_randomweapons;
 void GiveFrags (entity attacker, entity targ, float f, float deathtype)
 {
        // TODO route through PlayerScores instead
@@ -275,7 +282,6 @@ void Obituary_SpecialDeath(
        else { backtrace("Obituary_SpecialDeath called without a special deathtype?\n"); return; }
 }
 
-float w_deathtype;
 float Obituary_WeaponDeath(
        entity notif_target,
        float murder,
@@ -629,11 +635,6 @@ void Unfreeze (entity targ)
        targ.iceblock = world;
 }
 
-// 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, float deathtype, vector hitloc, vector force)
 {
        float mirrordamage;
@@ -948,7 +949,6 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
        }
 }
 
-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, float deathtype, entity directhitentity)
        // Returns total damage applies to creatures
 {
@@ -1087,9 +1087,9 @@ float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector in
                                                                else
                                                                        hitloc = nearest;
                                                        }
-                                                       nearest_x = targ.origin.x + targ.mins.x + random() * targ.size.x;
-                                                       nearest_y = targ.origin.y + targ.mins.y + random() * targ.size.y;
-                                                       nearest_z = targ.origin.z + targ.mins.z + random() * targ.size.z;
+                                                       nearest.x = targ.origin.x + targ.mins.x + random() * targ.size.x;
+                                                       nearest.y = targ.origin.y + targ.mins.y + random() * targ.size.y;
+                                                       nearest.z = targ.origin.z + targ.mins.z + random() * targ.size.z;
                                                }
 
                                                nearest = hitloc * (1 / max(1, hits));
@@ -1143,15 +1143,6 @@ float RadiusDamage (entity inflictor, entity attacker, float coredamage, float e
        return RadiusDamageForSource (inflictor, (inflictor.origin + (inflictor.mins + inflictor.maxs) * 0.5), inflictor.velocity, attacker, coredamage, edgedamage, rad, cantbe, mustbe, false, forceintensity, deathtype, directhitentity);
 }
 
-.float fire_damagepersec;
-.float fire_endtime;
-.float fire_deathtype;
-.entity fire_owner;
-.float fire_hitsound;
-.entity fire_burner;
-
-void fireburner_think();
-
 float Fire_IsBurning(entity e)
 {
        return (time < e.fire_endtime);