+void ewheel_findtarget(entity this)
+{
+ entity e = find(NULL, targetname, this.target);
+ if (!e)
+ {
+ LOG_TRACE("Initital waypoint for ewheel does NOT exist, fix your map!");
+ this.target = "";
+ }
+
+ if (e.classname != "turret_checkpoint")
+ LOG_TRACE("Warning: not a turret path");
+ else
+ {
+
+#ifdef EWHEEL_FANCYPATH
+ this.pathcurrent = pathlib_astar(this, this.origin, e.origin);
+ this.pathgoal = e;
+#else
+ this.pathcurrent = e;
+#endif
+ }
+}
+