Module dpmod: Change committed

havoc at icculus.org havoc at icculus.org
Sat Oct 11 01:37:57 EDT 2003


Commiter   : havoc
CVSROOT    : /cvs/cvsroot/twilight
Module     : dpmod
Commit time: 2003-10-11 05:37:57 UTC

Log message:

added DP_QC_TRACE_MOVETYPES extension (purely documentation), DP_QC_TRACE_MOVETYPE_WORLDONLY extension, DP_QC_TRACE_MOVETYPE_HITMODEL extension, and test code for DP_QC_TRACE_MOVETYPE_HITMODEL extension

Modified files:
     qc/dpextensions.qc qc/w_frame.qc

------=MIME.8bb2dbbd54d4a2e05602ebacbd368d8e
Content-Type: text/plain; name="dpmod.20031011.053757.havoc.diff"
Content-Disposition: attachment; filename="dpmod.20031011.053757.havoc.diff"
Content-Transfer-Encoding: 8bit

Index: dpmod/qc/dpextensions.qc
diff -u dpmod/qc/dpextensions.qc:1.13 dpmod/qc/dpextensions.qc:1.14
--- dpmod/qc/dpextensions.qc:1.13	Sat Aug  9 12:20:28 2003
+++ dpmod/qc/dpextensions.qc	Sat Oct 11 01:37:47 2003
@@ -16,6 +16,32 @@
 //	ext_setcolor = TRUE;
 //from then on you can check ext_setcolor to know if that extension is available
 
+//DP_QC_TRACE_MOVETYPES
+//idea: LordHavoc
+//darkplaces implementation: id Software
+//constant definitions:
+float MOVE_NORMAL = 0; // same as FALSE
+float MOVE_NOMONSTERS = 1; // same as TRUE
+float MOVE_MISSILE = 2; // save as movement with .movetype == MOVETYPE_FLYMISSILE
+//description:
+//this extension does nothing (do not check for it), it only documents existing MOVE_ values that were never defined in defs.qc, these are passed as the 'nomonsters' parameter to traceline/tracebox
+
+//DP_QC_TRACE_MOVETYPE_WORLDONLY
+//idea: LordHavoc
+//darkplaces implementation: LordHavoc
+//constant definitions:
+float MOVE_WORLDONLY = 3;
+//description:
+//allows traces to hit only world (see DP_QC_TRACE_MOVETYPES for how to use this)
+
+//DP_QC_TRACE_MOVETYPE_HITMODEL
+//idea: LordHavoc
+//darkplaces implementation: LordHavoc
+//constant definitions:
+float MOVE_HITMODEL = 4;
+//description:
+//allows traces to hit alias models (not sprites!) instead of entity boxes (see DP_QC_TRACE_MOVETYPES for how to use this)
+
 // LordHavoc: HIGHLY experimental, do not implement this in other engines
 //DP_CGAME
 //idea: LordHavoc
@@ -271,7 +297,7 @@
 //replace "visor" "common/nodraw" // this makes the visor mesh invisible
 ////it is not possible to rename tags using this format
 //
-//Or the Quake3 syntax (100% compatible withe Quake3's .skin files):
+//Or the Quake3 syntax (100% compatible with Quake3's .skin files):
 //helmet,progs/test/helmet1.tga // this is a mesh shader replacement
 //teamstripes,progs/test/redstripes.tga
 //visor,common/nodraw // this makes the visor mesh invisible
Index: dpmod/qc/w_frame.qc
diff -u dpmod/qc/w_frame.qc:1.6 dpmod/qc/w_frame.qc:1.7
--- dpmod/qc/w_frame.qc:1.6	Wed Jun 11 05:07:37 2003
+++ dpmod/qc/w_frame.qc	Sat Oct 11 01:37:47 2003
@@ -74,6 +74,24 @@
 	shotorg = self.origin + self.view_ofs + v_right * 6 - v_up * 6 + v_forward * 15;
 	shotdir = v_forward;
 
+	/*
+	// DP_QC_TRACE_MOVETYPE_HITMODEL test code
+	traceline(shotorg, shotorg + shotdir * 1000, MOVE_NORMAL, self);
+	if (trace_fraction < 1)
+	if (trace_ent.solid == SOLID_SLIDEBOX)
+	{
+		sprint(self, "aiming at slidebox entity ");
+		s = etos(trace_ent);
+		sprint(self, s);
+		sprint(self, " box");
+		traceline(shotorg, shotorg + shotdir * 1000, MOVE_HITMODEL, self);
+		if (trace_fraction < 1)
+		if (trace_ent.solid == SOLID_SLIDEBOX)
+			sprint(self, " model");
+		sprint(self, \n");
+	}
+	*/
+
 	self.idealzoom = 1;
 	if (self.button4)
 		self.idealzoom = 0.2;


More information about the twilight-commits mailing list