]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/steerlib.qc
Purge self from most of the monster code
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / steerlib.qc
index beaab08a4d5823f7cab36dd313d103f9068fd146..ae850618d8110a9316ee2a6e6942c8b920154c91 100644 (file)
@@ -48,14 +48,14 @@ vector steerlib_attract(vector point, float maximal_distance)
     return  direction * (1-(distance / maximal_distance));
 }
 
-vector steerlib_attract2(vector point, float min_influense,float max_distance,float max_influense)
-{SELFPARAM();
+vector steerlib_attract2(entity this, vector point, float min_influense,float max_distance,float max_influense)
+{
     float distance;
     vector direction;
     float influense;
 
-    distance  = bound(0.00001,vlen(self.origin - point),max_distance);
-    direction = normalize(point - self.origin);
+    distance  = bound(0.00001,vlen(this.origin - point),max_distance);
+    direction = normalize(point - this.origin);
 
     influense = 1 - (distance / max_distance);
     influense = min_influense + (influense * (max_influense - min_influense));