projects
/
xonotic
/
xonotic-data.pk3dir.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f5f4d18
)
Reintroduce periodic recalculation of nearest waypoint of static items but only while...
author
terencehill <piuntn@gmail.com>
Sat, 18 Mar 2017 23:32:08 +0000
(
00:32
+0100)
committer
terencehill <piuntn@gmail.com>
Sat, 18 Mar 2017 23:32:08 +0000
(
00:32
+0100)
qcsrc/server/bot/default/navigation.qc
patch
|
blob
|
history
diff --git
a/qcsrc/server/bot/default/navigation.qc
b/qcsrc/server/bot/default/navigation.qc
index 75ddd15f5dabcb10bcdde3d132a28e9c1f4e7edb..b0953089819843403abd957073f7cb3d48fd0a9e 100644
(file)
--- a/
qcsrc/server/bot/default/navigation.qc
+++ b/
qcsrc/server/bot/default/navigation.qc
@@
-853,6
+853,9
@@
void navigation_routerating(entity this, entity e, float f, float rangebias)
}
else
{
+ if(autocvar_g_waypointeditor && e.nearestwaypointtimeout >= 0 && time > e.nearestwaypointtimeout)
+ e.nearestwaypoint = NULL;
+
if ((!e.nearestwaypoint || e.navigation_dynamicgoal)
&& e.nearestwaypointtimeout >= 0 && time > e.nearestwaypointtimeout)
{
@@
-875,6
+878,8
@@
void navigation_routerating(entity this, entity e, float f, float rangebias)
if(e.navigation_dynamicgoal)
e.nearestwaypointtimeout = time + 2;
+ else if(autocvar_g_waypointeditor)
+ e.nearestwaypointtimeout = time + 3 + random() * 2;
}
nwp = e.nearestwaypoint;
}