]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/gamemode_onslaught.qc
Merge branch 'master' into terencehill/hud_cleanups
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / gamemode_onslaught.qc
index 32dcaf556f4df867df989a757bfc0e634032b470..8b2e223c041fe0756db6072621e04e73dccb162a 100644 (file)
@@ -1,9 +1,10 @@
-#include "../_all.qh"
 
 #include "gamemode.qh"
 #include "../controlpoint.qh"
 #include "../generator.qh"
 
+void FixSize(entity e);
+
 // =======================
 // CaptureShield Functions
 // =======================
@@ -27,7 +28,7 @@ void ons_CaptureShield_Touch()
        vector mymid = (self.absmin + self.absmax) * 0.5;
        vector othermid = (other.absmin + other.absmax) * 0.5;
 
-       Damage(other, self, self, 0, DEATH_HURTTRIGGER, mymid, normalize(othermid - mymid) * ons_captureshield_force);
+       Damage(other, self, self, 0, DEATH_HURTTRIGGER.m_id, mymid, normalize(othermid - mymid) * ons_captureshield_force);
 
        if(IS_REAL_CLIENT(other))
        {
@@ -228,8 +229,8 @@ void onslaught_updatelinks()
 // Main Link Functions
 // ===================
 
-bool ons_Link_Send(entity to, int sendflags)
-{SELFPARAM();
+bool ons_Link_Send(entity this, entity to, int sendflags)
+{
        WriteByte(MSG_ENTITY, ENT_CLIENT_RADARLINK);
        WriteByte(MSG_ENTITY, sendflags);
        if(sendflags & 1)
@@ -553,6 +554,8 @@ void ons_ControlPoint_Icon_BuildThink()
                Send_Effect(EFFECT_RAGE, self.origin + 10 * randomvec(), '0 0 -1', 1);
 }
 
+void onslaught_controlpoint_icon_link(entity e, void() spawnproc);
+
 void ons_ControlPoint_Icon_Spawn(entity cp, entity player)
 {
        entity e = spawn();
@@ -1100,7 +1103,7 @@ bool Onslaught_CheckWinner()
                        else
                                d = d * tmp_entity.max_health / max(30, 60 * autocvar_timelimit_suddendeath);
 
-                       Damage(tmp_entity, tmp_entity, tmp_entity, d, DEATH_HURTTRIGGER, tmp_entity.origin, '0 0 0');
+                       Damage(tmp_entity, tmp_entity, tmp_entity, d, DEATH_HURTTRIGGER.m_id, tmp_entity.origin, '0 0 0');
 
                        tmp_entity.sprite.SendFlags |= 16;
 
@@ -2025,8 +2028,8 @@ keys:
 "target" - first control point.
 "target2" - second control point.
  */
-void spawnfunc_onslaught_link()
-{SELFPARAM();
+spawnfunc(onslaught_link)
+{
        if(!g_onslaught) { remove(self); return; }
 
        if (self.target == "" || self.target2 == "")
@@ -2050,8 +2053,8 @@ keys:
 "message" - name of this control point (should reflect the location in the map, such as "center bridge", "north tower", etc)
  */
 
-void spawnfunc_onslaught_controlpoint()
-{SELFPARAM();
+spawnfunc(onslaught_controlpoint)
+{
        if(!g_onslaught) { remove(self); return; }
 
        ons_ControlPoint_Setup(self);
@@ -2066,8 +2069,8 @@ keys:
 "team" - team that owns this generator (5 = red, 14 = blue, etc), MUST BE SET.
 "targetname" - name that spawnfunc_onslaught_link entities will use to target this.
  */
-void spawnfunc_onslaught_generator()
-{SELFPARAM();
+spawnfunc(onslaught_generator)
+{
        if(!g_onslaught) { remove(self); return; }
        if(!self.team) { objerror("team must be set"); }