]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/nix/nix.qc
Cleanse PlayerUseKey and PlayerPreThink
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / nix / nix.qc
index 238e7fbacdcd8648fb85b6b2ba4d9e0e840af1f2..19faf090f8ef87f1cbb43928ed0d940ac533e25a 100644 (file)
@@ -265,12 +265,13 @@ MUTATOR_HOOKFUNCTION(nix, OnEntityPreSpawn)
 }
 
 MUTATOR_HOOKFUNCTION(nix, PlayerPreThink)
-{SELFPARAM();
+{
+       entity player = M_ARGV(0, entity);
+
        if(!intermission_running)
-       if(!IS_DEAD(self))
-       if(IS_PLAYER(self))
-               NIX_GiveCurrentWeapon(this);
-       return false;
+       if(!IS_DEAD(player))
+       if(IS_PLAYER(player))
+               NIX_GiveCurrentWeapon(player);
 }
 
 MUTATOR_HOOKFUNCTION(nix, PlayerSpawn)