]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_damage.qh
Some more defs.qh cleanup, update gameplay hash (again)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_damage.qh
index a99846c734f7dd916d3b54ecc5b8b597425a1371..f6ae1d5e075069e40732912dfd8141bd228c74c8 100644 (file)
@@ -4,6 +4,7 @@
 #elif defined(MENUQC)
 #elif defined(SVQC)
     #include <server/defs.qh>
+    #include <server/items/items.qh>
     #include <server/miscfunctions.qh>
     #include <lib/warpzone/common.qh>
     #include <common/constants.qh>
@@ -13,7 +14,6 @@
     #include "weapons/accuracy.qh"
     #include "weapons/csqcprojectile.qh"
     #include "weapons/selection.qh"
-    #include <common/t_items.qh>
     #include "autocvars.qh"
     #include "constants.qh"
     #include "defs.qh"
     #include "spawnpoints.qh"
 #endif
 
+.void(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force) event_damage;
+
+.bool(entity targ, entity inflictor, float amount, float limit) event_heal;
+
 .float dmg;
 .float dmg_edge;
 .float dmg_force;
@@ -40,6 +44,9 @@ void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad
 
 float checkrules_firstblood;
 
+.float damagedbycontents;
+.float damagedbytriggers;
+
 float yoda;
 float damage_goodhits;
 float damage_gooddamage;
@@ -52,6 +59,19 @@ float damage_gooddamage;
 .bool istypefrag;
 .float taunt_soundtime;
 
+.float spawnshieldtime;
+
+.int totalfrags;
+
+.bool canteamdamage;
+
+.vector death_origin;
+
+.float damage_dealt, typehitsound, killsound;
+
+// used for custom deathtype
+string deathmessage;
+
 float IsFlying(entity a);
 
 void UpdateFrags(entity player, int f);
@@ -81,12 +101,27 @@ float Obituary_WeaponDeath(
 
 void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .entity weaponentity);
 
+// Frozen status effect
+//const int FROZEN_NOT              = 0;
+const int FROZEN_NORMAL             = 1;
+const int FROZEN_TEMP_REVIVING      = 2;
+const int FROZEN_TEMP_DYING         = 3;
+
+.float revival_time; // time at which player was last revived
+.float revive_speed; // NOTE: multiplier (anything above 1 is instaheal)
+.float freeze_time;
+.entity iceblock;
+.entity frozen_by; // for ice fields
+
 void Ice_Think(entity this);
 
-void Freeze(entity targ, float freeze_time, int frozen_type, bool show_waypoint);
+void Freeze(entity targ, float revivespeed, int frozen_type, bool show_waypoint);
 
 void Unfreeze(entity targ, bool reset_health);
 
+// WEAPONTODO
+#define DMG_NOWEP (weaponentities[0])
+
 // 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);
 
@@ -96,6 +131,11 @@ float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector in
 
 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 damageforcescale;
+const float MIN_DAMAGEEXTRARADIUS = 2;
+const float MAX_DAMAGEEXTRARADIUS = 16;
+.float damageextraradius;
+
 // Calls .event_heal on the target so that they can handle healing themselves
 // a limit of RES_LIMIT_NONE should be handled by the entity as its max health (if applicable)
 bool Heal(entity targ, entity inflictor, float amount, float limit);