]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/anticheat.qc
Use SELFPARAM() in every function that uses self
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / anticheat.qc
index 6647633ff9c9eec920d6f24d8ea73e9f55ca2e80..f795a1acb2e93320a6af2f330a860e0a9c73bd19 100644 (file)
@@ -63,7 +63,7 @@ float movement_oddity(vector m0, vector m1)
 }
 
 void anticheat_physics()
-{
+{SELFPARAM();
        float f;
 
        // div0_evade -> SPECTATORS
@@ -150,13 +150,13 @@ void anticheat_physics()
 }
 
 void anticheat_spectatecopy(entity spectatee)
-{
+{SELFPARAM();
        // div0_evade -> SPECTATORS
        self.angles = spectatee.anticheat_div0_evade_v_angle;
 }
 
 void anticheat_prethink()
-{
+{SELFPARAM();
        // div0_evade -> SPECTATORS
        self.anticheat_div0_evade_offset = 0;
 }
@@ -173,7 +173,7 @@ string anticheat_display(float f, float tmin, float mi, float ma)
 }
 
 void anticheat_report()
-{
+{SELFPARAM();
        if(!autocvar_sv_eventlog)
                return;
        // TODO(divVerent): Use xonstat to acquire good thresholds.
@@ -198,7 +198,7 @@ void anticheat_report()
 }
 
 float anticheat_getvalue(string id)
-{
+{SELFPARAM();
        switch(id) {
                case "_time": return servertime - self.anticheat_jointime;
                case "speedhack": return MEAN_EVALUATE(anticheat_speedhack);
@@ -228,12 +228,12 @@ void anticheat_startframe()
 }
 
 void anticheat_fixangle()
-{
+{SELFPARAM();
        self.anticheat_fixangle_endtime = servertime + ANTILAG_LATENCY(self) + 0.2;
 }
 
 void anticheat_endframe()
-{
+{SELFPARAM();
        entity oldself = self;
        FOR_EACH_CLIENT(self)
                if (self.fixangle)
@@ -243,7 +243,7 @@ void anticheat_endframe()
 }
 
 void anticheat_init()
-{
+{SELFPARAM();
        self.anticheat_speedhack_offset = 0;
        self.anticheat_jointime = servertime;
 }