]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
better waypoint auditing
authorRudolf Polzer <divverent@xonotic.org>
Sun, 7 Aug 2011 15:26:55 +0000 (17:26 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 7 Aug 2011 15:29:08 +0000 (17:29 +0200)
qcsrc/server/bot/waypoints.qc
qcsrc/server/cl_impulse.qc

index 3bfb53264f19c241fbc562e21ba9ba6a09cfe463..29a6b86adc1443105a32fd13a6ead910d03afc3a 100644 (file)
@@ -772,13 +772,12 @@ void waypoint_spawnforitem(entity e)
        waypoint_spawnforitem_force(e, e.origin);
 };
 
-void waypoint_spawnforteleporter(entity e, vector destination, float timetaken)
+void waypoint_spawnforteleporter_v(entity e, vector org, vector destination, float timetaken)
 {
        local entity w;
        local entity dw;
-       vector org;
-       org = (e.absmin + e.absmax) * 0.5;
        org = waypoint_fixorigin(org);
+       destination = waypoint_fixorigin(destination);
        w = waypoint_spawn(org, org, WAYPOINTFLAG_GENERATED | WAYPOINTFLAG_TELEPORT | WAYPOINTFLAG_NORELINK);
        dw = waypoint_spawn(destination, destination, WAYPOINTFLAG_GENERATED);
        // one way link to the destination
@@ -790,6 +789,11 @@ void waypoint_spawnforteleporter(entity e, vector destination, float timetaken)
        e.nearestwaypointtimeout = time + 1000000000;
 };
 
+void waypoint_spawnforteleporter(entity e, vector destination, float timetaken)
+{
+       waypoint_spawnforteleporter_v(e, (e.absmin + e.absmax) * 0.5, destination, timetaken);
+};
+
 entity waypoint_spawnpersonal(vector position)
 {
        entity w;
index 3ae62bc56962cc0b16ae435508f2837c061c1f78..939b6d2580b67a98b00b4cd3cf1590024922d2e6 100644 (file)
@@ -259,8 +259,8 @@ void ImpulseCommands (void)
                                case 107:
                                        for(e = findchain(classname, "waypoint"); e; e = e.chain)
                                        {
-                                               e.colormod_x = 1;
-                                               e.effects &~= EF_NODEPTHTEST | EF_RED | EF_BLUE | EF_BRIGHTLIGHT;
+                                               e.colormod = '0.5 0.5 0.5';
+                                               e.effects &~= EF_NODEPTHTEST | EF_RED | EF_BLUE;
                                        }
                                        e2 = navigation_findnearestwaypoint(self, FALSE);
                                        navigation_markroutes(e2);
@@ -271,8 +271,8 @@ void ImpulseCommands (void)
                                                if(e.wpcost >= 10000000)
                                                {
                                                        print("unreachable: ", etos(e), " ", vtos(e.origin), "\n");
-                                                       e.colormod_x = 0.1;
-                                                       e.effects |= EF_NODEPTHTEST | EF_BLUE | EF_BRIGHTLIGHT;
+                                                       e.colormod_z = 8;
+                                                       e.effects |= EF_NODEPTHTEST | EF_BLUE;
                                                        ++i;
                                                        ++m;
                                                }
@@ -286,10 +286,10 @@ void ImpulseCommands (void)
                                                if(e.wpcost >= 10000000)
                                                {
                                                        print("cannot reach me: ", etos(e), " ", vtos(e.origin), "\n");
-                                                       e.colormod_x = 0.1;
+                                                       e.colormod_x = 8;
                                                        if not(e.effects & EF_NODEPTHTEST) // not already reported before
                                                                ++m;
-                                                       e.effects |= EF_NODEPTHTEST | EF_RED | EF_BRIGHTLIGHT;
+                                                       e.effects |= EF_NODEPTHTEST | EF_RED;
                                                        ++i;
                                                }
                                        }
@@ -306,17 +306,18 @@ void ImpulseCommands (void)
                                                if(navigation_findnearestwaypoint(e, FALSE))
                                                {
                                                        setorigin(e, org);
-                                                       e.effects &~= EF_NODEPTHTEST | EF_BRIGHTLIGHT;
+                                                       e.effects &~= EF_NODEPTHTEST;
                                                        e.model = "";
                                                }
                                                else
                                                {
                                                        setorigin(e, org);
                                                        print("spawn without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
-                                                       e.effects |= EF_NODEPTHTEST | EF_BRIGHTLIGHT;
+                                                       e.effects |= EF_NODEPTHTEST;
                                                        setmodel(e, self.model);
                                                        e.frame = self.frame;
                                                        e.skin = self.skin;
+                                                       e.colormod = '8 0.5 8';
                                                        setsize(e, '0 0 0', '0 0 0');
                                                        ++i;
                                                }
@@ -328,7 +329,8 @@ void ImpulseCommands (void)
                                        start = findchainflags(flags, FL_ITEM);
                                        for(e = start; e; e = e.chain)
                                        {
-                                               e.effects &~= EF_NODEPTHTEST | EF_RED | EF_BLUE | EF_BRIGHTLIGHT;
+                                               e.effects &~= EF_NODEPTHTEST | EF_RED | EF_BLUE;
+                                               e.colormod = '0.5 0.5 0.5';
                                        }
                                        for(e = start; e; e = e.chain)
                                        {
@@ -338,7 +340,8 @@ void ImpulseCommands (void)
                                                else
                                                {
                                                        print("item without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
-                                                       e.effects |= EF_NODEPTHTEST | EF_RED | EF_BRIGHTLIGHT;
+                                                       e.effects |= EF_NODEPTHTEST | EF_RED;
+                                                       e.colormod_x = 8;
                                                        ++i;
                                                }
                                        }
@@ -354,7 +357,8 @@ void ImpulseCommands (void)
                                                else
                                                {
                                                        print("item without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
-                                                       e.effects |= EF_NODEPTHTEST | EF_BLUE | EF_BRIGHTLIGHT;
+                                                       e.effects |= EF_NODEPTHTEST | EF_BLUE;
+                                                       e.colormod_z = 8;
                                                        ++i;
                                                }
                                        }