]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/accuracy.qc
Remove remove()
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / accuracy.qc
index ed7db1e73ca3db89fdfa4ff779a0e1348ff888d8..9efc4ce6a0700f31511eb9dfb2c9a5ae56e92cb9 100644 (file)
@@ -1,10 +1,10 @@
 #include "accuracy.qh"
 
 #include "../mutators/all.qh"
-#include "../../common/constants.qh"
-#include "../../common/teams.qh"
-#include "../../common/util.qh"
-#include "../../common/weapons/all.qh"
+#include <common/constants.qh>
+#include <common/teams.qh>
+#include <common/util.qh>
+#include <common/weapons/all.qh>
 
 int accuracy_byte(float n, float d)
 {
@@ -39,8 +39,7 @@ bool accuracy_send(entity this, entity to, int sf)
 // init/free
 void accuracy_init(entity e)
 {
-       entity a = e.accuracy = new(accuracy);
-       make_pure(a);
+       entity a = e.accuracy = new_pure(accuracy);
        a.owner = e;
        a.drawonlytoclient = e;
        Net_LinkEntity(a, false, 0, accuracy_send);
@@ -48,7 +47,7 @@ void accuracy_init(entity e)
 
 void accuracy_free(entity e)
 {
-       remove(e.accuracy);
+       delete(e.accuracy);
 }
 
 // force a resend of a player's accuracy stats
@@ -93,8 +92,8 @@ bool accuracy_isgooddamage(entity attacker, entity targ)
        int mutator_check = MUTATOR_CALLHOOK(AccuracyTargetValid, attacker, targ);
 
        if (warmup_stage) return false;
-       if (targ.deadflag != DEAD_NO) return false;
-       if (targ.frozen) return false;
+       if (IS_DEAD(targ)) return false;
+       if (STAT(FROZEN, targ)) return false;
        if (SAME_TEAM(attacker, targ)) return false;
 
        if (mutator_check == MUT_ACCADD_INVALID) return true;