]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_impulse.qc
Merge remote-tracking branch 'origin/master' into tzork/gm_nexball
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_impulse.qc
index 3dfd2a6aa7d1449d6950da633e59f170f3f0db8d..9e662bb848e204b1a5b59dcd283424247d396951 100644 (file)
@@ -35,7 +35,7 @@
 
 void ImpulseCommands (void)
 {
-       local float imp;
+       float imp;
        vector org;
        float i;
        float m;
@@ -70,7 +70,7 @@ void ImpulseCommands (void)
                                        W_NextWeapon (0);
                                        break;
                                case 11:
-                                       W_SwitchWeapon (self.cnt); // previously used
+                                       W_LastWeapon();
                                        break;
                                case 12:
                                        W_PreviousWeapon (0);
@@ -259,7 +259,7 @@ void ImpulseCommands (void)
                                case 107:
                                        for(e = findchain(classname, "waypoint"); e; e = e.chain)
                                        {
-                                               e.colormod_x = 1;
+                                               e.colormod = '0.5 0.5 0.5';
                                                e.effects &~= EF_NODEPTHTEST | EF_RED | EF_BLUE;
                                        }
                                        e2 = navigation_findnearestwaypoint(self, FALSE);
@@ -271,7 +271,7 @@ void ImpulseCommands (void)
                                                if(e.wpcost >= 10000000)
                                                {
                                                        print("unreachable: ", etos(e), " ", vtos(e.origin), "\n");
-                                                       e.colormod_x = 0.1;
+                                                       e.colormod_z = 8;
                                                        e.effects |= EF_NODEPTHTEST | EF_BLUE;
                                                        ++i;
                                                        ++m;
@@ -286,7 +286,7 @@ 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;
@@ -317,12 +317,53 @@ void ImpulseCommands (void)
                                                        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;
                                                }
                                        }
                                        if(i)
                                                print(ftos(i), " spawnpoints have no nearest waypoint (marked by player model)\n");
+                                       i = 0;
+                                       entity start;
+                                       start = findchainflags(flags, FL_ITEM);
+                                       for(e = start; e; e = e.chain)
+                                       {
+                                               e.effects &~= EF_NODEPTHTEST | EF_RED | EF_BLUE;
+                                               e.colormod = '0.5 0.5 0.5';
+                                       }
+                                       for(e = start; e; e = e.chain)
+                                       {
+                                               if(navigation_findnearestwaypoint(e, FALSE))
+                                               {
+                                               }
+                                               else
+                                               {
+                                                       print("item without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
+                                                       e.effects |= EF_NODEPTHTEST | EF_RED;
+                                                       e.colormod_x = 8;
+                                                       ++i;
+                                               }
+                                       }
+                                       if(i)
+                                               print(ftos(i), " items have no nearest waypoint and cannot be walked away from (marked with red light)\n");
+                                       i = 0;
+                                       for(e = start; e; e = e.chain)
+                                       {
+                                               org = e.origin;
+                                               if(navigation_findnearestwaypoint(e, TRUE))
+                                               {
+                                               }
+                                               else
+                                               {
+                                                       print("item without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
+                                                       e.effects |= EF_NODEPTHTEST | EF_BLUE;
+                                                       e.colormod_z = 8;
+                                                       ++i;
+                                               }
+                                       }
+                                       if(i)
+                                               print(ftos(i), " items have no nearest waypoint and cannot be walked to (marked with blue light)\n");
                                        break;
                        }
                }