[nexuiz-commits] r8315 - in trunk/data/qcsrc/server/bot: . havocbot
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sun Nov 22 14:58:53 EST 2009
Author: div0
Date: 2009-11-22 14:58:53 -0500 (Sun, 22 Nov 2009)
New Revision: 8315
Modified:
trunk/data/qcsrc/server/bot/havocbot/havocbot.qc
trunk/data/qcsrc/server/bot/navigation.qc
Log:
fixing teleport waypoints in scripting
Modified: trunk/data/qcsrc/server/bot/havocbot/havocbot.qc
===================================================================
--- trunk/data/qcsrc/server/bot/havocbot/havocbot.qc 2009-11-22 19:09:57 UTC (rev 8314)
+++ trunk/data/qcsrc/server/bot/havocbot/havocbot.qc 2009-11-22 19:58:53 UTC (rev 8315)
@@ -1294,12 +1294,22 @@
other.absmax = pos;
other.dphitcontentsmask = self.dphitcontentsmask;
if(ExactTriggerHit())
+ {
wp.wpflags |= WAYPOINTFLAG_TELEPORT;
+ s.lastteleporttime = 0;
+ }
remove(other);
self = s;
other = o;
}
+/*
+ if(wp.wpflags & WAYPOINTFLAG_TELEPORT)
+ print("routing to a teleporter\n");
+ else
+ print("routing to a non-teleporter\n");
+*/
+
return CMD_STATUS_EXECUTING;
}
Modified: trunk/data/qcsrc/server/bot/navigation.qc
===================================================================
--- trunk/data/qcsrc/server/bot/navigation.qc 2009-11-22 19:09:57 UTC (rev 8314)
+++ trunk/data/qcsrc/server/bot/navigation.qc 2009-11-22 19:58:53 UTC (rev 8315)
@@ -842,7 +842,7 @@
if(self.goalcurrent.wpflags & WAYPOINTFLAG_TELEPORT)
{
if(self.lastteleporttime>0)
- if(time-self.lastteleporttime<0.15)
+ if(time-self.lastteleporttime<(self.goalcurrent.wpflags & WAYPOINTFLAG_PERSONAL)?2:0.15)
{
if(self.aistatus & AI_STATUS_WAYPOINT_PERSONAL_GOING)
if(self.goalcurrent.wpflags & WAYPOINTFLAG_PERSONAL && self.goalcurrent.owner==self)
More information about the nexuiz-commits
mailing list