X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcl_impulse.qc;h=524e796af2e32859054ee3a82522eae1ddb85147;hb=14401d27dcc6eeb85c80331c242dcbb3e1d977d7;hp=3dfd2a6aa7d1449d6950da633e59f170f3f0db8d;hpb=2e44f19e0c92cf7fab9e7d21f15abda16118765b;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/cl_impulse.qc b/qcsrc/server/cl_impulse.qc index 3dfd2a6aa..524e796af 100644 --- a/qcsrc/server/cl_impulse.qc +++ b/qcsrc/server/cl_impulse.qc @@ -35,7 +35,7 @@ void ImpulseCommands (void) { - local float imp; + float imp; vector org; float i; float m; @@ -46,7 +46,7 @@ void ImpulseCommands (void) return; self.impulse = 0; - if (timeoutStatus == 2) //don't allow any impulses while the game is paused + if (timeout_status == TIMEOUT_ACTIVE) //don't allow any impulses while the game is paused return; if(CheatImpulse(imp)) @@ -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; } }