r5884 - in trunk/data: . qcsrc/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Feb 17 07:39:23 EST 2009


Author: div0
Date: 2009-02-17 07:39:23 -0500 (Tue, 17 Feb 2009)
New Revision: 5884

Modified:
   trunk/data/qcsrc/client/Main.qc
   trunk/data/shotorigin_adjuster.cfg
Log:
allow to temporarily hide the shot origin editor


Modified: trunk/data/qcsrc/client/Main.qc
===================================================================
--- trunk/data/qcsrc/client/Main.qc	2009-02-17 11:50:53 UTC (rev 5883)
+++ trunk/data/qcsrc/client/Main.qc	2009-02-17 12:39:23 UTC (rev 5884)
@@ -365,7 +365,8 @@
 	self.origin = view_origin + view_forward * self.view_ofs_x + view_right * self.view_ofs_y + view_up * self.view_ofs_z;
 	self.angles = view_angles;
 	self.angles_x = -self.angles_x;
-	R_AddEntity(self);
+	if not(self.cnt)
+		R_AddEntity(self);
 }
 void ShotOrg_Draw2D()
 {
@@ -472,6 +473,12 @@
 			debug_shotorg.view_ofs = debug_shotorg.view_ofs * (stof(argv(1)) / debug_shotorg.view_ofs_x); // closer/farther, same xy pos
 		localcmd("sv_cmd debug_shotorg \"", vtos(debug_shotorg.view_ofs), "\"\n");
 	}
+	else if(cmd == "shotorg_toggle_hide") {
+		if(debug_shotorg)
+		{
+			debug_shotorg.cnt = !debug_shotorg.cnt;
+		}
+	}
 	else if(cmd == "shotorg_end") {
 		if(debug_shotorg)
 		{

Modified: trunk/data/shotorigin_adjuster.cfg
===================================================================
--- trunk/data/shotorigin_adjuster.cfg	2009-02-17 11:50:53 UTC (rev 5883)
+++ trunk/data/shotorigin_adjuster.cfg	2009-02-17 12:39:23 UTC (rev 5884)
@@ -2,6 +2,7 @@
 echo "Move the shot origin forward/backward using INS and PGUP keys."
 echo "Move the shot origin forward/backward without changing its position in the view using NUM + and - keys."
 echo "Move it to the default shot origin using the NUM * key."
+echo "Temporarily hide the shot origin using the NUM INS/0 key."
 echo "Write it down and press NUM / when done."
 
 cl_cmd shotorg_move "0 0 0" // init
@@ -22,6 +23,8 @@
 
 bind KP_ENTER "commandmode _load_shotorigin_from_bone"
 
+bind KP_INS "cl_cmd shotorg_toggle_hide"
+
 alias _load_shotorigin_from_bone "sv_cmd gettaginfo w 0 $1 \"cl_cmd shotorg_set \\\"\" \"\\\"\""
 
 prvm_edictset server 1 alpha 0.8




More information about the nexuiz-commits mailing list