projects
/
xonotic
/
xonotic-data.pk3dir.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
17e8ecf
)
Fix bots sometimes getting stuck in front of certain teleports (e.g. Boil's teleport)
author
terencehill <piuntn@gmail.com>
Mon, 1 May 2017 21:23:22 +0000
(23:23 +0200)
committer
terencehill <piuntn@gmail.com>
Mon, 1 May 2017 21:23:22 +0000
(23:23 +0200)
qcsrc/server/bot/default/havocbot/havocbot.qc
patch
|
blob
|
history
diff --git
a/qcsrc/server/bot/default/havocbot/havocbot.qc
b/qcsrc/server/bot/default/havocbot/havocbot.qc
index 42f51af8c7f279c3e1e510fd2ff3c1e56dd469d0..dd65b45afa51fa0c60e0495e63d11086f0214eb5 100644
(file)
--- a/
qcsrc/server/bot/default/havocbot/havocbot.qc
+++ b/
qcsrc/server/bot/default/havocbot/havocbot.qc
@@
-722,6
+722,12
@@
void havocbot_movetogoal(entity this)
destorg.x = bound(m1_x, destorg.x, m2_x);
destorg.y = bound(m1_y, destorg.y, m2_y);
destorg.z = bound(m1_z, destorg.z, m2_z);
+
+ // in case bot ends up inside the teleport waypoint without touching
+ // the teleport itself, head to the teleport origin
+ if(destorg == this.origin)
+ destorg = this.goalcurrent.origin;
+
diff = destorg - this.origin;
//dist = vlen(diff);
dir = normalize(diff);