[nexuiz-commits] r7899 - in trunk/data: . qcsrc/server qcsrc/server/bot

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Sep 25 13:34:11 EDT 2009


Author: div0
Date: 2009-09-25 13:34:11 -0400 (Fri, 25 Sep 2009)
New Revision: 7899

Modified:
   trunk/data/Makefile
   trunk/data/defaultNexuiz.cfg
   trunk/data/qcsrc/server/bot/waypoints.qc
   trunk/data/qcsrc/server/cl_impulse.qc
Log:
merge impulse 107 and 108 into one


Modified: trunk/data/Makefile
===================================================================
--- trunk/data/Makefile	2009-09-25 17:26:09 UTC (rev 7898)
+++ trunk/data/Makefile	2009-09-25 17:34:11 UTC (rev 7899)
@@ -58,7 +58,7 @@
 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/*.*

Modified: trunk/data/defaultNexuiz.cfg
===================================================================
--- trunk/data/defaultNexuiz.cfg	2009-09-25 17:26:09 UTC (rev 7898)
+++ trunk/data/defaultNexuiz.cfg	2009-09-25 17:34:11 UTC (rev 7899)
@@ -420,8 +420,7 @@
 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

Modified: trunk/data/qcsrc/server/bot/waypoints.qc
===================================================================
--- trunk/data/qcsrc/server/bot/waypoints.qc	2009-09-25 17:26:09 UTC (rev 7898)
+++ trunk/data/qcsrc/server/bot/waypoints.qc	2009-09-25 17:34:11 UTC (rev 7899)
@@ -767,7 +767,7 @@
 
 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;

Modified: trunk/data/qcsrc/server/cl_impulse.qc
===================================================================
--- trunk/data/qcsrc/server/cl_impulse.qc	2009-09-25 17:26:09 UTC (rev 7898)
+++ trunk/data/qcsrc/server/cl_impulse.qc	2009-09-25 17:34:11 UTC (rev 7899)
@@ -512,7 +512,7 @@
 			}
 		}
 	}
-	else if(imp >= 103 && imp <= 108)
+	else if(imp >= 103 && imp <= 107)
 	{
 		if(cvar("g_waypointeditor"))
 		{
@@ -538,36 +538,38 @@
 					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 | 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 = 1;
-							e.effects &~= EF_NODEPTHTEST;
-						}
-						else
-						{
 							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)
+						if(e.wpcost >= 10000000)
 						{
-							e.colormod_x = 1;
-							e.effects &~= EF_NODEPTHTEST;
-						}
-						else
-						{
 							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;
 			}
 		}



More information about the nexuiz-commits mailing list