]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/default/navigation.qh
Some minor tweaks to jetpack navigation
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / default / navigation.qh
index c6d172cce9800bb87b040bd573a10ccbd40d31af..f3103cc4fcd39d875708a0612e83c59addd03095 100644 (file)
@@ -50,6 +50,10 @@ entity navigation_bestgoal;
 #define navigation_item_addlink(from_wp, to_item) \
        waypoint_addlink_customcost(to_item, from_wp, waypoint_getlinkcost(from_wp, to_item))
 
+#define TELEPORT_USED(pl, tele_wp) \
+       (time - pl.lastteleporttime < ((tele_wp.wpflags & WAYPOINTFLAG_PERSONAL) ? 2 : 0.15) \
+       && boxesoverlap(tele_wp.absmin, tele_wp.absmax, pl.lastteleport_origin + STAT(PL_MIN, pl), pl.lastteleport_origin + STAT(PL_MAX, pl)))
+
 vector tracewalk_dest;
 float tracewalk_dest_height;
 
@@ -57,6 +61,7 @@ float tracewalk_dest_height;
 .entity wp_goal_prev1;
 
 .float lastteleporttime;
+.vector lastteleport_origin;
 
 .float blacklisted;