[nexuiz-commits] r6222 - in branches/nexuiz-2.0: . data data/qcsrc/server data/qcsrc/server/tturrets/units data/scripts misc/tools

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Mar 19 08:39:52 EDT 2009


Author: div0
Date: 2009-03-19 08:39:52 -0400 (Thu, 19 Mar 2009)
New Revision: 6222

Modified:
   branches/nexuiz-2.0/.patchsets
   branches/nexuiz-2.0/data/defaultNexuiz.cfg
   branches/nexuiz-2.0/data/qcsrc/server/bots.qc
   branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc
   branches/nexuiz-2.0/data/qcsrc/server/cl_player.qc
   branches/nexuiz-2.0/data/qcsrc/server/csqcprojectile.qc
   branches/nexuiz-2.0/data/qcsrc/server/defs.qh
   branches/nexuiz-2.0/data/qcsrc/server/extensions.qh
   branches/nexuiz-2.0/data/qcsrc/server/g_triggers.qc
   branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc
   branches/nexuiz-2.0/data/qcsrc/server/sv_main.qc
   branches/nexuiz-2.0/data/qcsrc/server/tturrets/units/unit_common.qc
   branches/nexuiz-2.0/data/qcsrc/server/tturrets/units/unit_ewheel.qc
   branches/nexuiz-2.0/data/qcsrc/server/tturrets/units/unit_walker.qc
   branches/nexuiz-2.0/data/qcsrc/server/w_common.qc
   branches/nexuiz-2.0/data/scripts/entities.def
   branches/nexuiz-2.0/misc/tools/makebuild.sh
Log:
r6210 | div0 | 2009-03-18 07:27:29 +0100 (Wed, 18 Mar 2009) | 2 lines
netradiant r222
r6211 | div0 | 2009-03-18 12:22:22 +0100 (Wed, 18 Mar 2009) | 3 lines
use checkpvs() for bot waypointing
redstarrepublic now relinks twice as fast
r6212 | div0 | 2009-03-18 12:35:40 +0100 (Wed, 18 Mar 2009) | 2 lines
merge entities.def (ZQ_PAUSE)
r6213 | div0 | 2009-03-18 15:08:12 +0100 (Wed, 18 Mar 2009) | 2 lines
UpdateSelectedPlayer: use PVS to optimize
r6214 | div0 | 2009-03-18 15:13:36 +0100 (Wed, 18 Mar 2009) | 2 lines
typo fix, and some StartFrame speedup
r6215 | div0 | 2009-03-18 15:26:13 +0100 (Wed, 18 Mar 2009) | 2 lines
sv_pogostick 1 (it's harmless, it can do nothing you can't otherwise do, but it makes stuff easier)
r6216 | div0 | 2009-03-19 11:39:49 +0100 (Thu, 19 Mar 2009) | 3 lines
make misc_follow able to set up attachments (so you can attach a model to another in a map, useful for zym animations)
add a cheat +button8: drag'n'drop of entities
r6217 | div0 | 2009-03-19 12:12:27 +0100 (Thu, 19 Mar 2009) | 2 lines
some drag cursor improvements :P
r6218 | div0 | 2009-03-19 12:13:41 +0100 (Thu, 19 Mar 2009) | 2 lines
drag cursor: don't overshoot when moving back
r6219 | div0 | 2009-03-19 12:14:41 +0100 (Thu, 19 Mar 2009) | 2 lines
drag cursor: start at the 32 grid
r6220 | div0 | 2009-03-19 13:14:30 +0100 (Thu, 19 Mar 2009) | 2 lines
make turrets work again


Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets	2009-03-19 12:23:00 UTC (rev 6221)
+++ branches/nexuiz-2.0/.patchsets	2009-03-19 12:39:52 UTC (rev 6222)
@@ -1,2 +1,2 @@
 master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-6039,6044-6208
+revisions_applied = 1-6039,6044-6220

Modified: branches/nexuiz-2.0/data/defaultNexuiz.cfg
===================================================================
--- branches/nexuiz-2.0/data/defaultNexuiz.cfg	2009-03-19 12:23:00 UTC (rev 6221)
+++ branches/nexuiz-2.0/data/defaultNexuiz.cfg	2009-03-19 12:39:52 UTC (rev 6222)
@@ -277,8 +277,8 @@
 // use default physics
 exec physics25.cfg
 
-set sv_pogostick 0	"don't require releasing the space bar for jumping again"
-set sv_doublejump 0	"allow Quake 2-style double jumps"
+set sv_pogostick 1 "don't require releasing the space bar for jumping again"
+set sv_doublejump 0 "allow Quake 2-style double jumps"
 
 seta sv_precacheplayermodels 1
 seta sv_precacheweapons 0

Modified: branches/nexuiz-2.0/data/qcsrc/server/bots.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/bots.qc	2009-03-19 12:23:00 UTC (rev 6221)
+++ branches/nexuiz-2.0/data/qcsrc/server/bots.qc	2009-03-19 12:39:52 UTC (rev 6222)
@@ -486,6 +486,9 @@
 	from.wp00 = to;from.wp00mincost = c;return;
 };
 
+// fields you can query using prvm_global server to get some statistics about waypoint linking culling
+float relink_total, relink_walkculled, relink_pvsculled, relink_lengthculled;
+
 // relink this spawnfunc_waypoint
 // (precompile a list of all reachable waypoints from this spawnfunc_waypoint)
 // (SLOW!)
@@ -496,9 +499,8 @@
 	//dprint("waypoint_think wpisbox = ", ftos(self.wpisbox), "\n");
 	sm1 = self.origin + self.mins;
 	sm2 = self.origin + self.maxs;
-	e = find(world, classname, "waypoint");
 	stepheightvec = cvar("sv_stepheight") * '0 0 1';
-	while (e)
+	for(e = world; (e = find(e, classname, "waypoint")); )
 	{
 		if (boxesoverlap(self.absmin, self.absmax, e.absmin, e.absmax))
 		{
@@ -507,6 +509,12 @@
 		}
 		else
 		{
+			++relink_total;
+			if(!checkpvs(self.origin, e))
+			{
+				++relink_pvsculled;
+				continue;
+			}
 			sv = e.origin;
 			sv_x = bound(sm1_x, sv_x, sm2_x);
 			sv_y = bound(sm1_y, sv_y, sm2_y);
@@ -519,38 +527,41 @@
 			ev_z = bound(em1_z, ev_z, em2_z);
 			dv = ev - sv;
 			dv_z = 0;
-			if (vlen(dv) < 1050) // max search distance in XY
+			if (vlen(dv) >= 1050) // max search distance in XY
 			{
-				navigation_testtracewalk = 0;
-				if (!self.wpisbox)
+				++relink_lengthculled;
+				continue;
+			}
+			navigation_testtracewalk = 0;
+			if (!self.wpisbox)
+			{
+				tracebox(sv - PL_MIN_z * '0 0 1', PL_MIN, PL_MAX, sv, FALSE, self);
+				if (!trace_startsolid)
 				{
-					tracebox(sv - PL_MIN_z * '0 0 1', PL_MIN, PL_MAX, sv, FALSE, self);
-					if (!trace_startsolid)
-					{
-						//dprint("sv deviation", vtos(trace_endpos - sv), "\n");
-						sv = trace_endpos + '0 0 1';
-					}
+					//dprint("sv deviation", vtos(trace_endpos - sv), "\n");
+					sv = trace_endpos + '0 0 1';
 				}
-				if (!e.wpisbox)
+			}
+			if (!e.wpisbox)
+			{
+				tracebox(ev - PL_MIN_z * '0 0 1', PL_MIN, PL_MAX, ev, FALSE, e);
+				if (!trace_startsolid)
 				{
-					tracebox(ev - PL_MIN_z * '0 0 1', PL_MIN, PL_MAX, ev, FALSE, e);
-					if (!trace_startsolid)
-					{
-						//dprint("ev deviation", vtos(trace_endpos - ev), "\n");
-						ev = trace_endpos + '0 0 1';
-					}
+					//dprint("ev deviation", vtos(trace_endpos - ev), "\n");
+					ev = trace_endpos + '0 0 1';
 				}
-				//traceline(self.origin, e.origin, FALSE, world);
-				//if (trace_fraction == 1)
-				if (!self.wpisbox)
-				if (tracewalk(self, sv, PL_MIN, PL_MAX, ev, MOVE_NOMONSTERS))
-					waypoint_addlink(self, e);
-				if (!e.wpisbox)
-				if (tracewalk(e, ev, PL_MIN, PL_MAX, sv, MOVE_NOMONSTERS))
-					waypoint_addlink(e, self);
 			}
+			//traceline(self.origin, e.origin, FALSE, world);
+			//if (trace_fraction == 1)
+			if (!self.wpisbox && tracewalk(self, sv, PL_MIN, PL_MAX, ev, MOVE_NOMONSTERS))
+				waypoint_addlink(self, e);
+			else
+				relink_walkculled += 0.5;
+			if (!e.wpisbox && tracewalk(e, ev, PL_MIN, PL_MAX, sv, MOVE_NOMONSTERS))
+				waypoint_addlink(e, self);
+			else
+				relink_walkculled += 0.5;
 		}
-		e = find(e, classname, "waypoint");
 	}
 	navigation_testtracewalk = 0;
 };
@@ -759,6 +770,7 @@
 void waypoint_schedulerelinkall()
 {
 	local entity head;
+	relink_total = relink_walkculled = relink_pvsculled = relink_lengthculled = 0;
 	head = findchain(classname, "waypoint");
 	while (head)
 	{

Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc	2009-03-19 12:23:00 UTC (rev 6221)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc	2009-03-19 12:39:52 UTC (rev 6222)
@@ -2379,7 +2379,20 @@
 	target_voicescript_next(self);
 }
 
+void DragCursor_Think()
+{
+	self.model = self.owner.dragentity.model;
+	self.modelindex = self.owner.dragentity.modelindex;
+	self.origin = self.owner.dragentity.origin;
+	self.angles = self.owner.dragentity.angles;
+	self.tag_entity = self.owner.dragentity.tag_entity;
+	self.tag_index = self.owner.dragentity.tag_index;
+	self.scale = self.owner.dragentity.scale;
+	detach_sameorigin(self);
 
+	self.nextthink = time;
+}
+
 /*
 =============
 PlayerPostThink
@@ -2426,6 +2439,62 @@
 		self.idlekick_lasttimeleft = timeleft;
 	}
 
+	if(sv_cheats)
+		if(self.BUTTON_DRAG)
+			if(!self.dragentity)
+				if(self.cursor_trace_ent)
+					if(!self.cursor_trace_ent.tag_index)
+					{
+						self.dragentity = self.cursor_trace_ent;
+						self.dragcursor = spawn();
+						self.dragcursor.owner = self;
+						self.dragcursor.think = DragCursor_Think;
+						self.dragcursor.nextthink = time;
+						self.dragcursor.exteriormodeltoclient = self;
+						attach_sameorigin(self.dragentity, self.weaponentity, "");
+						self.dragentity.effects |= EF_FLAME;
+					}
+	
+	if(self.dragentity)
+	{
+		if(self.BUTTON_DRAG)
+		{
+			float f;
+			if(self.dragspeed == 0)
+				self.dragspeed = 32;
+			if(self.impulse == 10 || self.impulse == 15 || self.impulse == 18)
+			{
+				f = 1 + self.dragspeed / vlen(self.dragentity.origin);
+				self.dragentity.origin = self.dragentity.origin * f;
+				self.impulse = 0;
+			}
+			else if(self.impulse == 12 || self.impulse == 16 || self.impulse == 19)
+			{
+				f = max(0.5, 1 - self.dragspeed / vlen(self.dragentity.origin));
+				self.dragentity.origin = self.dragentity.origin * f;
+				self.impulse = 0;
+			}
+			else if(self.impulse >= 1 && self.impulse <= 9)
+			{
+				self.dragspeed = pow(2, self.impulse);
+				self.impulse = 0;
+			}
+			else if(self.impulse == 14)
+			{
+				self.dragspeed = pow(2, 10);
+				self.impulse = 0;
+			}
+		}
+		else
+		{
+			self.dragentity.effects &~= EF_FLAME;
+			detach_sameorigin(self.dragentity);
+			self.dragentity = world;
+			remove(self.dragcursor);
+			self.dragcursor = world;
+		}
+	}
+
 	if(self.classname == "player") {
 		CheckRules_Player();
 		UpdateChatBubble();

Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_player.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_player.qc	2009-03-19 12:23:00 UTC (rev 6221)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_player.qc	2009-03-19 12:39:52 UTC (rev 6222)
@@ -544,6 +544,10 @@
 	if(c <= mincosangle)
 		return -2;
 
+	// not visible in any way? forget it
+	if(!checkpvs(so, p))
+		return -2;
+
 	traceline(so, p.origin, MOVE_NOMONSTERS, self);
 	if(trace_fraction < 1)
 		return -2;

Modified: branches/nexuiz-2.0/data/qcsrc/server/csqcprojectile.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/csqcprojectile.qc	2009-03-19 12:23:00 UTC (rev 6221)
+++ branches/nexuiz-2.0/data/qcsrc/server/csqcprojectile.qc	2009-03-19 12:39:52 UTC (rev 6222)
@@ -70,11 +70,24 @@
 	}
 }
 
+.void(void) csqcprojectile_oldthink;
+.float csqcprojectile_oldnextthink;
+
+void CSQCProjectile_Update_Think()
+{
+	UpdateCSQCProjectile(self);
+	self.think = self.csqcprojectile_oldthink;
+	self.nextthink = max(time, self.csqcprojectile_oldnextthink);
+}
+
 void UpdateCSQCProjectileNextFrame(entity e)
 {
 	if(e.SendEntity == CSQCProjectile_SendEntity)
+	if(e.think != CSQCProjectile_Update_Think)
 	{
-		// send new origin data
-		e.NextFrameSendFlags |= 1;
+		e.csqcprojectile_oldthink = e.think;
+		e.csqcprojectile_oldnextthink = e.nextthink;
+		e.think = CSQCProjectile_Update_Think;
+		e.nextthink = time;
 	}
 }

Modified: branches/nexuiz-2.0/data/qcsrc/server/defs.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/defs.qh	2009-03-19 12:23:00 UTC (rev 6221)
+++ branches/nexuiz-2.0/data/qcsrc/server/defs.qh	2009-03-19 12:39:52 UTC (rev 6222)
@@ -11,6 +11,7 @@
 #define BUTTON_INFO   button7
 #define BUTTON_CHAT   buttonchat
 #define BUTTON_USE    buttonuse
+#define BUTTON_DRAG   button8
 
 // Globals
 
@@ -552,4 +553,6 @@
 
 float servertime, serverprevtime, serverframetime;
 
-.float NextFrameSendFlags;
+.entity dragentity;
+.float dragspeed;
+.entity dragcursor;

Modified: branches/nexuiz-2.0/data/qcsrc/server/extensions.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/extensions.qh	2009-03-19 12:23:00 UTC (rev 6221)
+++ branches/nexuiz-2.0/data/qcsrc/server/extensions.qh	2009-03-19 12:39:52 UTC (rev 6222)
@@ -639,6 +639,18 @@
 //description:
 //similar to find() but returns a chain of entities like findradius.
 
+//DP_QC_FINDCHAIN_TOFIELD
+//idea: div0
+//darkplaces implementation: div0
+//builtin definitions:
+entity(.string fld, float match, .entity tofield) findradius_tofield = #22;
+entity(.string fld, string match, .entity tofield) findchain_tofield = #402;
+entity(.string fld, float match, .entity tofield) findchainflags_tofield = #450;
+entity(.string fld, float match, .entity tofield) findchainfloat_tofield = #403;
+//description:
+//similar to findchain() etc, but stores the chain into .tofield instead of .chain
+//actually, the .entity tofield is an optional field of the the existing findchain* functions
+
 //DP_QC_FINDCHAINFLAGS
 //idea: Sajt
 //darkplaces implementation: LordHavoc
@@ -1783,6 +1795,14 @@
 //description:
 //sv_jumpstep allows stepping up onto stairs while airborn, sv_stepheight controls how high a single step can be.
 
+//FTE_QC_CHECKPVS
+//idea: Urre
+//darkplaces implementation: div0
+//builtin definitions:
+float checkpvs(vector viewpos, entity viewee) = #240;
+//description:
+//returns true if viewee can be seen from viewpos according to PVS data
+
 //FTE_STRINGS
 //idea: many
 //darkplaces implementation: KrimZon
@@ -1869,3 +1889,18 @@
 //EXT_CSQC
 // #232 void(float index, float type, .void field) SV_AddStat (EXT_CSQC)
 void(float index, float type, ...) addstat = #232;
+
+//ZQ_PAUSE
+//idea: ZQuake
+//darkplaces implementation: GreEn`mArine
+//builtin definitions:
+void(float pause) setpause = #531;
+//function definitions:
+//void(float elapsedtime) SV_PausedTic;
+//description:
+//during pause the world is not updated (time does not advance), SV_PausedTic is the only function you can be sure will be called at regular intervals during the pause, elapsedtime is the current system time in seconds since the pause started (not affected by slowmo or anything else).
+//
+//calling setpause(0) will end a pause immediately.
+//
+//Note: it is worth considering that network-related functions may be called during the pause (including customizeentityforclient for example), and it is also important to consider the continued use of the KRIMZON_SV_PARSECLIENTCOMMAND extension while paused (chatting players, etc), players may also join/leave during the pause.  In other words, the only things that are not called are think and other time-related functions.
+

Modified: branches/nexuiz-2.0/data/qcsrc/server/g_triggers.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_triggers.qc	2009-03-19 12:23:00 UTC (rev 6221)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_triggers.qc	2009-03-19 12:39:52 UTC (rev 6222)
@@ -1347,11 +1347,33 @@
 		return;
 	}
 
-	dst.movetype = MOVETYPE_FOLLOW;
-	dst.aiment = src;
-	dst.punchangle = src.angles;
-	dst.view_ofs = dst.origin - src.origin;
-	dst.v_angle = dst.angles - src.angles;
+	if(self.spawnflags & 1)
+	{
+		// attach
+		if(self.spawnflags & 2)
+		{
+			setattachment(dst, src, self.message);
+		}
+		else
+		{
+			attach_sameorigin(dst, src, self.message);
+		}
+	}
+	else
+	{
+		if(self.spawnflags & 2)
+		{
+			dst.movetype = MOVETYPE_FOLLOW;
+			dst.aiment = src;
+			// dst.punchangle = '0 0 0'; // keep unchanged
+			dst.view_ofs = dst.origin;
+			dst.v_angle = dst.angles;
+		}
+		else
+		{
+			follow_sameorigin(dst, src);
+		}
+	}
 
 	remove(self);
 }

Modified: branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc	2009-03-19 12:23:00 UTC (rev 6221)
+++ branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc	2009-03-19 12:39:52 UTC (rev 6222)
@@ -2047,3 +2047,80 @@
 	}
 	return vecs;
 }
+
+
+
+void attach_sameorigin(entity e, entity to, string tag)
+{
+	vector org, t_forward, t_left, t_up, e_forward, e_up;
+	vector org0, ang0;
+
+	ang0 = e.angles;
+	org0 = e.origin;
+
+	org = e.origin - gettaginfo(to, gettagindex(to, tag));
+	t_forward = v_forward;
+	t_left = v_right * -1;
+	t_up = v_up;
+
+	e.origin_x = org * t_forward;
+	e.origin_y = org * t_left;
+	e.origin_z = org * t_up;
+
+	// current forward and up directions
+	if(substring(e.model, 0, 1) == "*") // bmodels have their own rules
+		e.angles_x = -e.angles_x;
+	fixedmakevectors(e.angles);
+
+	// untransform forward, up!
+	e_forward_x = v_forward * t_forward;
+	e_forward_y = v_forward * t_left;
+	e_forward_z = v_forward * t_up;
+	e_up_x = v_up * t_forward;
+	e_up_y = v_up * t_left;
+	e_up_z = v_up * t_up;
+
+	e.angles = fixedvectoangles2(e_forward, e_up);
+	if(substring(e.model, 0, 1) == "*") // bmodels have their own rules
+		e.angles_x = -e.angles_x;
+
+	setattachment(e, to, tag);
+	setorigin(e, e.origin);
+}
+
+void detach_sameorigin(entity e)
+{
+	vector org;
+	org = gettaginfo(e, 0);
+	e.angles = fixedvectoangles2(v_forward, v_up);
+	if(substring(e.model, 0, 1) == "*") // bmodels have their own rules
+		e.angles_x = -e.angles_x;
+	e.origin = org;
+	setattachment(e, world, "");
+	setorigin(e, e.origin);
+}
+
+void follow_sameorigin(entity e, entity to)
+{
+	e.movetype = MOVETYPE_FOLLOW; // make the hole follow
+	e.aiment = to; // make the hole follow bmodel
+	e.punchangle = to.angles; // the original angles of bmodel
+	e.view_ofs = e.origin - to.origin; // relative origin
+	e.v_angle = e.angles - to.angles; // relative angles
+}
+
+void unfollow_sameorigin(entity e)
+{
+	e.movetype = MOVETYPE_NONE;
+}
+
+entity gettaginfo_relative_ent;
+vector gettaginfo_relative(entity e, float tag)
+{
+	if(!gettaginfo_relative_ent)
+		gettaginfo_relative_ent = spawn();
+	gettaginfo_relative_ent.model = e.model;
+	gettaginfo_relative_ent.modelindex = e.modelindex;
+	gettaginfo_relative_ent.frame = e.frame;
+	return gettaginfo(gettaginfo_relative_ent, tag);
+}

Modified: branches/nexuiz-2.0/data/qcsrc/server/sv_main.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/sv_main.qc	2009-03-19 12:23:00 UTC (rev 6221)
+++ branches/nexuiz-2.0/data/qcsrc/server/sv_main.qc	2009-03-19 12:39:52 UTC (rev 6222)
@@ -141,11 +141,6 @@
 	dprint_load(); // load dprint status from cvar
 
 	entity e;
-	for(e = world; (e = findflags(e, NextFrameSendFlags, 0xFFFFFF)); )
-	{
-		e.SendFlags |= e.NextFrameSendFlags;
-		e.NextFrameSendFlags = 0;
-	}
 	for(e = world; (e = findfloat(e, csqcprojectile_clientanimate, 1)); )
 		CSQCProjectile_Check(e);
 

Modified: branches/nexuiz-2.0/data/qcsrc/server/tturrets/units/unit_common.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/tturrets/units/unit_common.qc	2009-03-19 12:23:00 UTC (rev 6221)
+++ branches/nexuiz-2.0/data/qcsrc/server/tturrets/units/unit_common.qc	2009-03-19 12:39:52 UTC (rev 6222)
@@ -8,17 +8,17 @@
         return 0;
 
     f = gettagindex(self,"tag_head");
-    v = gettaginfo(self,f);
+    v = gettaginfo_relative(self,f);
     v = v + self.origin;
     setorigin(self.tur_head,v);
 
     f = gettagindex(self.tur_head,"tag_fire");
-    v = gettaginfo(self.tur_head,f) + (self.tur_head.origin - self.origin);
+    v = gettaginfo_relative(self.tur_head,f) + (self.tur_head.origin - self.origin);
     v_y *= -1;
     self.tur_shotorg = v;
 
     f = gettagindex(self.tur_head,"tag_aim");
-    v = gettaginfo(self.tur_head,f) + (self.tur_head.origin - self.origin);
+    v = gettaginfo_relative(self.tur_head,f) + (self.tur_head.origin - self.origin);
     self.tur_aimorg  = v;
 
     return 1;
@@ -30,12 +30,12 @@
     float f;
 
     f = gettagindex(self.tur_head,"tag_fire");
-    v = gettaginfo(self.tur_head,f) + (self.tur_head.origin - self.origin);
+    v = gettaginfo_relative(self.tur_head,f) + (self.tur_head.origin - self.origin);
     v_y *= -1;
     self.tur_shotorg = v;
 
     f = gettagindex(self.tur_head,"tag_aim");
-    v = gettaginfo(self.tur_head,f) + (self.tur_head.origin - self.origin);
+    v = gettaginfo_relative(self.tur_head,f) + (self.tur_head.origin - self.origin);
     self.tur_aimorg  = v;
 
     return 1;

Modified: branches/nexuiz-2.0/data/qcsrc/server/tturrets/units/unit_ewheel.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/tturrets/units/unit_ewheel.qc	2009-03-19 12:23:00 UTC (rev 6221)
+++ branches/nexuiz-2.0/data/qcsrc/server/tturrets/units/unit_ewheel.qc	2009-03-19 12:39:52 UTC (rev 6222)
@@ -29,7 +29,7 @@
     for (i=0;i<1;++i)
     {
         f = gettagindex(self.tur_head,"tag_fire");
-        v = gettaginfo(self.tur_head,f);
+        v = gettaginfo_relative(self.tur_head,f);
         v_y = v_y * -1;
         self.tur_shotorg = v;
         turret_do_updates(self);
@@ -292,7 +292,7 @@
     vector v;
     float f;
     f = gettagindex(self.tur_head,"tag_fire");
-    v = gettaginfo(self.tur_head,f);
+    v = gettaginfo_relative(self.tur_head,f);
     v_y = v_y * -1;
 
     //setsize(self,WALKER_MIN,WALKER_MAX);

Modified: branches/nexuiz-2.0/data/qcsrc/server/tturrets/units/unit_walker.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/tturrets/units/unit_walker.qc	2009-03-19 12:23:00 UTC (rev 6221)
+++ branches/nexuiz-2.0/data/qcsrc/server/tturrets/units/unit_walker.qc	2009-03-19 12:39:52 UTC (rev 6222)
@@ -369,7 +369,7 @@
     else
         f = gettagindex(self.owner,"tag_rocket02");
 
-    org = self.owner.origin + gettaginfo(self.owner,f);
+    org = self.owner.origin + gettaginfo_relative(self.owner,f);
 
     self.nextthink = time + 0.2;
     oldself = self;
@@ -711,7 +711,7 @@
     vector v;
     float f;
     f = gettagindex(self.tur_head,"tag_fire");
-    v = gettaginfo(self.tur_head,f);
+    v = gettaginfo_relative(self.tur_head,f);
     v_y = v_y * -1;
 
     setsize(self,WALKER_MIN,WALKER_MAX);

Modified: branches/nexuiz-2.0/data/qcsrc/server/w_common.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/w_common.qc	2009-03-19 12:23:00 UTC (rev 6221)
+++ branches/nexuiz-2.0/data/qcsrc/server/w_common.qc	2009-03-19 12:39:52 UTC (rev 6222)
@@ -159,7 +159,7 @@
 	self.velocity = self.W_BallisticBullet_LeaveSolid_velocity;
 
 	self.think = self.W_BallisticBullet_LeaveSolid_think_save;
-	self.nextthink = max(time, self.W_BallisticBullet_LeaveSolid_nextthink_save) + 1;
+	self.nextthink = max(time, self.W_BallisticBullet_LeaveSolid_nextthink_save);
 	self.W_BallisticBullet_LeaveSolid_think_save = SUB_Null;
 
 	self.flags &~= FL_ONGROUND;

Modified: branches/nexuiz-2.0/data/scripts/entities.def
===================================================================
--- branches/nexuiz-2.0/data/scripts/entities.def	2009-03-19 12:23:00 UTC (rev 6221)
+++ branches/nexuiz-2.0/data/scripts/entities.def	2009-03-19 12:39:52 UTC (rev 6222)
@@ -1183,11 +1183,16 @@
 wait: wait so many seconds before triggering
 */
 
-/*QUAKED misc_follow (.5 .5 .5) (-8 -8 -8) (8 8 8)
+/*QUAKED misc_follow (.5 .5 .5) (-8 -8 -8) (8 8 8) ATTACH LOCAL
 Makes one entity follow another. Will not work with all entities.
 -------- KEYS --------
 target: points to the entity to move (e.g. something that won't move by itself)
 killtarget: points to the entity that is to be used as the source (e.g. a func_plat)
+message: tag name to attach to (if ATTACH is used)
+punchangle: angle modifier (if LOCAL is used, and ATTACH is not)
+-------- SPAWNFLAGS --------
+ATTACH: attachment will be used instead of MOVETYPE_FOLLOW (mostly useful for attaching stuff to ZYM models)
+LOCAL: do not untransform the coordinates (that is, the map specifies local coordinates, not global ones). Mostly useful with ATTACH.
 */
 
 /*QUAKED weapon_minstanex (1 0 .5) (-30 -30 0) (30 30 32) FLOATING

Modified: branches/nexuiz-2.0/misc/tools/makebuild.sh
===================================================================
--- branches/nexuiz-2.0/misc/tools/makebuild.sh	2009-03-19 12:23:00 UTC (rev 6221)
+++ branches/nexuiz-2.0/misc/tools/makebuild.sh	2009-03-19 12:39:52 UTC (rev 6222)
@@ -10,7 +10,7 @@
 base=`pwd`
 
 # customizable specific stuff
-netradiant_release=1.5.0-svn212
+netradiant_release=1.5.0-svn222
 basepk3=$base/data20080229.pk3 # 2.4
 hotbasepk3= # hotfix
 nexdir=$base/nexuiz



More information about the nexuiz-commits mailing list