From a4d4ab28955d4b248c1d249b814fe21f5aaaf546 Mon Sep 17 00:00:00 2001 From: div0 Date: Fri, 25 Sep 2009 17:34:11 +0000 Subject: [PATCH] merge impulse 107 and 108 into one git-svn-id: svn://svn.icculus.org/nexuiz/trunk@7899 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/Makefile | 2 +- data/defaultNexuiz.cfg | 3 +-- data/qcsrc/server/bot/waypoints.qc | 2 +- data/qcsrc/server/cl_impulse.qc | 40 ++++++++++++++++-------------- 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/data/Makefile b/data/Makefile index dc73cd478..778276a3f 100644 --- a/data/Makefile +++ b/data/Makefile @@ -58,7 +58,7 @@ clean: csprogs.dat: qcsrc/client/*.* qcsrc/common/*.* cd qcsrc/client && $(FTEQCC) $(FTEQCCFLAGS) $(QCFLAGS_CSPROGS) -progs.dat: qcsrc/server/*.* qcsrc/common/*.* +progs.dat: qcsrc/server/*.* qcsrc/common/*.* qcsrc/server/*/*.* qcsrc/server/*/*/*.* cd qcsrc/server && $(FTEQCC) $(FTEQCCFLAGS) $(QCFLAGS_PROGS) menu.dat: qcsrc/menu/*.* qcsrc/menu/*/*.* qcsrc/common/*.* diff --git a/data/defaultNexuiz.cfg b/data/defaultNexuiz.cfg index 35180c297..ea1d25ee9 100644 --- a/data/defaultNexuiz.cfg +++ b/data/defaultNexuiz.cfg @@ -420,8 +420,7 @@ alias g_waypointeditor_spawn "impulse 103" alias g_waypointeditor_remove "impulse 104" alias g_waypointeditor_relinkall "impulse 105" alias g_waypointeditor_saveall "impulse 106" -alias g_waypointeditor_checkunreachable_fromhere "impulse 107" -alias g_waypointeditor_checkunreachable_tohere "impulse 108" +alias g_waypointeditor_checkunreachable "impulse 107" locs_enable 0 pausable 0 diff --git a/data/qcsrc/server/bot/waypoints.qc b/data/qcsrc/server/bot/waypoints.qc index 38e8f1845..1dbefdc9a 100644 --- a/data/qcsrc/server/bot/waypoints.qc +++ b/data/qcsrc/server/bot/waypoints.qc @@ -767,7 +767,7 @@ float waypoint_loadall() vector waypoint_fixorigin(vector position) { - tracebox(trace_endpos + '0 0 1' * (-1 - PL_MIN_z), PL_MIN, PL_MAX, trace_endpos + '0 0 -512', MOVE_NOMONSTERS, world); + tracebox(position + '0 0 1' * (-1 - PL_MIN_z), PL_MIN, PL_MAX, position + '0 0 -512', MOVE_NOMONSTERS, world); if(trace_fraction < 1) position = trace_endpos; return position; diff --git a/data/qcsrc/server/cl_impulse.qc b/data/qcsrc/server/cl_impulse.qc index 4e3426f73..d72bb317c 100644 --- a/data/qcsrc/server/cl_impulse.qc +++ b/data/qcsrc/server/cl_impulse.qc @@ -512,7 +512,7 @@ void ImpulseCommands (void) } } } - else if(imp >= 103 && imp <= 108) + else if(imp >= 103 && imp <= 107) { if(cvar("g_waypointeditor")) { @@ -538,36 +538,38 @@ void ImpulseCommands (void) waypoint_saveall(); break; case 107: - navigation_markroutes(navigation_findnearestwaypoint(self, FALSE)); for(e = findchain(classname, "waypoint"); e; e = e.chain) { - if(e.wpcost < 10000000) - { - e.colormod_x = 1; - e.effects &~= EF_NODEPTHTEST; - } - else + e.colormod_x = 1; + e.effects &~= EF_NODEPTHTEST | EF_RED | EF_BLUE; + } + e2 = navigation_findnearestwaypoint(self, FALSE); + navigation_markroutes(e2); + i = 0; + for(e = findchain(classname, "waypoint"); e; e = e.chain) + { + if(e.wpcost >= 10000000) { e.colormod_x = 0.1; - e.effects |= EF_NODEPTHTEST; + e.effects |= EF_NODEPTHTEST | EF_BLUE; + ++i; } } - break; - case 108: - navigation_markroutes_inverted(navigation_findnearestwaypoint(self, FALSE)); + if(i) + print(ftos(i), " waypoints cannot be reached from here in any way (marked with blue light)\n"); + navigation_markroutes_inverted(e2); + i = 0; for(e = findchain(classname, "waypoint"); e; e = e.chain) { - if(e.wpcost < 10000000) - { - e.colormod_x = 1; - e.effects &~= EF_NODEPTHTEST; - } - else + if(e.wpcost >= 10000000) { e.colormod_x = 0.1; - e.effects |= EF_NODEPTHTEST; + e.effects |= EF_NODEPTHTEST | EF_RED; + ++i; } } + if(i) + print(ftos(i), " waypoints cannot walk to here in any way (marked with red light)\n"); break; } } -- 2.39.2