]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Disable the server's ability to adjust the client's view model alignment
authorMario <mario@smbclan.net>
Wed, 14 Oct 2015 22:44:47 +0000 (08:44 +1000)
committerMario <mario@smbclan.net>
Wed, 14 Oct 2015 22:44:47 +0000 (08:44 +1000)
defaultXonotic.cfg
qcsrc/server/autocvars.qh
qcsrc/server/miscfunctions.qc

index 3735e55349da0713a11e59317ead64ebe0d13610..74b8541b4e116caae162a0ee0ebe0d2c5902e20b 100644 (file)
@@ -410,7 +410,6 @@ pausable 0
 set g_spawnshieldtime 1 "number of seconds you are invincible after you spawned, this shield is lost after you fire"
 set 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_nudge 0 "don't touch"
-set g_shootfromclient 2 "let client decide if it has the gun left or right; if set to 2, center handedness is allowed; see also cl_gunalign"
 set g_shootfromeye 0 "shots are fired from your eye/crosshair; visual gun position can still be influenced by cl_gunalign 1 and 2"
 set g_shootfromcenter 0 "weapon gets moved to the center, shots still come from the barrel of your weapon; visual gun position can still be influenced by cl_gunalign 1 and 2"
 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"
index affd9437ed279b83675d7fdd3d9ab9b12d3cda6a..dbdf4fd5cb93a4fba6401159407f933e8cf216f4 100644 (file)
@@ -461,7 +461,6 @@ float autocvar_g_respawn_ghosts_speed;
 int autocvar_g_respawn_waves;
 bool autocvar_g_running_guns;
 bool autocvar_g_shootfromcenter;
-int autocvar_g_shootfromclient;
 bool autocvar_g_shootfromeye;
 string autocvar_g_shootfromfixedorigin;
 int autocvar_g_showweaponspawns;
index 43036b4099a64d0972097ca50d3d91dc5bdf80b9..74eb09f5e367eb901b7adb28d1bd1f6bc38aabfa 100644 (file)
@@ -1566,40 +1566,25 @@ vector shotorg_adjustfromclient(vector vecs, float y_is_right, float allowcenter
 vector shotorg_adjust_values(vector vecs, float y_is_right, float visual, float algn)
 {
        string s;
-       vector v;
 
-       if (autocvar_g_shootfromeye)
-       {
-               if (visual)
-               {
-                       if (autocvar_g_shootfromclient) { vecs = shotorg_adjustfromclient(vecs, y_is_right, (autocvar_g_shootfromclient >= 2), algn); }
-                       else { vecs.y = 0; vecs.z -= 2; }
-               }
-               else
-               {
-                       vecs.y = 0;
-                       vecs.z = 0;
-               }
-       }
-       else if (autocvar_g_shootfromcenter)
+       if(visual)
+               vecs = shotorg_adjustfromclient(vecs, y_is_right, true, algn);
+       else if(autocvar_g_shootfromeye)
+               vecs.y = vecs.z = 0;
+       else if(autocvar_g_shootfromcenter)
        {
                vecs.y = 0;
                vecs.z -= 2;
        }
-       else if ((s = autocvar_g_shootfromfixedorigin) != "")
+       else if((s = autocvar_g_shootfromfixedorigin) != "")
        {
-               v = stov(s);
-               if (y_is_right)
-                       v.y = -v.y;
-               if (v.x != 0)
-                       vecs.x = v.x;
+               vector 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;
        }
-       else if (autocvar_g_shootfromclient)
-       {
-               vecs = shotorg_adjustfromclient(vecs, y_is_right, (autocvar_g_shootfromclient >= 2), algn);
-       }
+
        return vecs;
 }