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

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Jun 25 15:42:46 EDT 2009


Author: div0
Date: 2009-06-25 15:42:46 -0400 (Thu, 25 Jun 2009)
New Revision: 7109

Modified:
   trunk/data/defaultNexuiz.cfg
   trunk/data/qcsrc/server/miscfunctions.qc
Log:
cl_gunalign: default to center handedness so you know if you are on such a server.
also: mirror the ORIGINAL shot origin instead of using hardcoded values for left handed mode. Hardcoded makes many weapons look bad.


Modified: trunk/data/defaultNexuiz.cfg
===================================================================
--- trunk/data/defaultNexuiz.cfg	2009-06-25 17:29:17 UTC (rev 7108)
+++ trunk/data/defaultNexuiz.cfg	2009-06-25 19:42:46 UTC (rev 7109)
@@ -410,7 +410,7 @@
 seta g_spawnshieldtime 0 "number of seconds you are invincible after you spawned, this shield is lost after you fire"
 seta g_antilag 2	"AntiLag (0 = no AntiLag, 1 = verified client side hit scan, 2 = server side hit scan in the past, 3 = unverified client side hit scan)"
 set g_antilag_bullets 1 "Bullets AntiLag (0 = no AntiLag, 1 = server side hit scan in the past) - DO NOT TOUCH (severely changes weapon balance)"
-set g_shootfromclient 0 "let client decide if it has the gun left, center or right"
+set g_shootfromclient 0 "let client decide if it has the gun left, center or right (WARNING: cheating potential)"
 set g_shootfromeye 0 "shots are fired from your eye/crosshair"
 set g_shootfromcenter 0 "weapon gets moved to the center, shots still come from the barrel of your weapon"
 set g_shootfromfixedorigin "" "if set to a string like 0 y z, the gun is moved to the given y and z coordinates. If set to a string like x y z, the whole shot origin is used"
@@ -784,7 +784,7 @@
 seta r_ambient 4
 cl_decals_fadetime 1
 cl_decals_time 2
-set  cl_gunalign 1 "Gun alignment; 1 = right, 2 = left, 3 = center"
+set  cl_gunalign 3 "Gun alignment; 1 = right, 2 = left, 3 = center"
 seta cl_nogibs 0 "reduce number of violence effects, or remove them totally"
 seta cl_gibs_damageforcescale 3.5 "force to push around gibs"
 seta cl_gibs_lifetime 14 "average lifetime of gibs"

Modified: trunk/data/qcsrc/server/miscfunctions.qc
===================================================================
--- trunk/data/qcsrc/server/miscfunctions.qc	2009-06-25 17:29:17 UTC (rev 7108)
+++ trunk/data/qcsrc/server/miscfunctions.qc	2009-06-25 19:42:46 UTC (rev 7109)
@@ -2116,63 +2116,56 @@
 
 vector shotorg_adjust(vector vecs, float y_is_right, float visual)
 {
-    string s;
-    vector v;
+	string s;
+	vector v;
 
-    if (cvar("g_shootfromclient"))
-    {
-        switch(self.owner.cvar_cl_gunalign)
-        {
-            case 1: // right
-                vecs_y = -12;
-                vecs_z = -14;
-                break;
+	if (cvar("g_shootfromclient"))
+	{
+		switch(self.owner.cvar_cl_gunalign)
+		{
+			case 1: // right
+				break;
 
-            case 2: // right
-                vecs_y = 12;
-                vecs_z = -14    ;
-                break;
+			case 2: // left
+				vecs_y = -vecs_y;
+				break;
 
-            case 3: // center
-                vecs_y = 0;
-                vecs_z = -14;
-                break;
-
-            default:
-                vecs_y = -12;
-                vecs_z = -14;
-                break;
-        }
-    }
-    else if (cvar("g_shootfromeye"))
-    {
-        if (visual)
-        {
-            vecs_y = 0;
-            vecs_z -= 4;
-        }
-        else
-        {
-            vecs_y = 0;
-            vecs_z = 0;
-        }
-    }
-    else if (cvar("g_shootfromcenter"))
-    {
-        vecs_y = 0;
-        vecs_z -= 4;
-    }
-    else if ((s = cvar_string("g_shootfromfixedorigin")) != "")
-    {
-        v = stov(s);
-        if (y_is_right)
-            v_y = -v_y;
-        if (v_x != 0)
-            vecs_x = v_x;
-        vecs_y = v_y;
-        vecs_z = v_z;
-    }
-    return vecs;
+			default:
+			case 3: // center
+				vecs_y = 0;
+				vecs_z -= 4;
+				break;
+		}
+	}
+	else if (cvar("g_shootfromeye"))
+	{
+		if (visual)
+		{
+			vecs_y = 0;
+			vecs_z -= 4;
+		}
+		else
+		{
+			vecs_y = 0;
+			vecs_z = 0;
+		}
+	}
+	else if (cvar("g_shootfromcenter"))
+	{
+		vecs_y = 0;
+		vecs_z -= 4;
+	}
+	else if ((s = cvar_string("g_shootfromfixedorigin")) != "")
+	{
+		v = stov(s);
+		if (y_is_right)
+			v_y = -v_y;
+		if (v_x != 0)
+			vecs_x = v_x;
+		vecs_y = v_y;
+		vecs_z = v_z;
+	}
+	return vecs;
 }
 
 



More information about the nexuiz-commits mailing list