-.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)
{
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)
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
else { backtrace("Obituary_SpecialDeath called without a special deathtype?\n"); return; }
}
-float w_deathtype;
float Obituary_WeaponDeath(
entity notif_target,
float murder,
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;
}
}
-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
{
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));
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);