]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator_overkill.qc
Merge branch 'master' into TimePath/unified_weapons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator_overkill.qc
index 27eaed042b07a581163654bbf87112fd7bf6acf9..d2086215f931dc94143c9c1e71958e8932d14a0b 100644 (file)
@@ -4,8 +4,8 @@
 #include "mutator.qh"
 
 void W_Blaster_Attack(entity, float, float, float, float, float, float, float, float, float, float);
-void spawnfunc_weapon_hmg();
-void spawnfunc_weapon_rpc();
+spawnfunc(weapon_hmg);
+spawnfunc(weapon_rpc);
 
 void ok_DecreaseCharge(entity ent, int wep)
 {
@@ -84,7 +84,7 @@ MUTATOR_HOOKFUNCTION(ok_PlayerDies)
        self.ok_item = true;
        self.noalign = true;
        self.pickup_anyway = true;
-       spawnfunc_item_armor_small();
+       spawnfunc_item_armor_small(this);
        self.movetype = MOVETYPE_TOSS;
        self.gravity = 1;
        self.reset = SUB_Remove;
@@ -207,6 +207,9 @@ MUTATOR_HOOKFUNCTION(ok_PlayerSpawn)
        return false;
 }
 
+void _spawnfunc_weapon_hmg() { SELFPARAM(); spawnfunc_weapon_hmg(this); }
+void _spawnfunc_weapon_rpc() { SELFPARAM(); spawnfunc_weapon_rpc(this); }
+
 MUTATOR_HOOKFUNCTION(ok_OnEntityPreSpawn)
 {SELFPARAM();
        if(autocvar_g_powerups)
@@ -224,7 +227,7 @@ MUTATOR_HOOKFUNCTION(ok_OnEntityPreSpawn)
                        wep.team = self.team;
                        wep.respawntime = autocvar_g_overkill_superguns_respawn_time;
                        wep.pickup_anyway = true;
-                       wep.think = spawnfunc_weapon_hmg;
+                       wep.think = _spawnfunc_weapon_hmg;
                        wep.nextthink = time + 0.1;
                        return true;
                }
@@ -241,7 +244,7 @@ MUTATOR_HOOKFUNCTION(ok_OnEntityPreSpawn)
                        wep.team = self.team;
                        wep.respawntime = autocvar_g_overkill_superguns_respawn_time;
                        wep.pickup_anyway = true;
-                       wep.think = spawnfunc_weapon_rpc;
+                       wep.think = _spawnfunc_weapon_rpc;
                        wep.nextthink = time + 0.1;
                        return true;
                }