From d9dd0e0668e111836838bc0cc9eadb448b0d689f Mon Sep 17 00:00:00 2001 From: div0 Date: Wed, 19 Aug 2009 12:52:48 +0000 Subject: [PATCH] shootfromclient: allow centerhandedness only if set to 2 git-svn-id: svn://svn.icculus.org/nexuiz/trunk@7466 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/defaultNexuiz.cfg | 2 +- data/qcsrc/server/miscfunctions.qc | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/data/defaultNexuiz.cfg b/data/defaultNexuiz.cfg index d53ba4be5..914484a1b 100644 --- a/data/defaultNexuiz.cfg +++ b/data/defaultNexuiz.cfg @@ -429,7 +429,7 @@ pausable 0 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 (WARNING: cheating potential)" +set g_shootfromclient 1 "let client decide if it has the gun left or right; if set to 2, center handedness is allowed, and defaulted to, too" 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" diff --git a/data/qcsrc/server/miscfunctions.qc b/data/qcsrc/server/miscfunctions.qc index 5cc97f439..8df25b6cf 100644 --- a/data/qcsrc/server/miscfunctions.qc +++ b/data/qcsrc/server/miscfunctions.qc @@ -2201,9 +2201,17 @@ vector shotorg_adjust(vector vecs, float y_is_right, float visual) break; default: - case 3: // center - vecs_y = 0; - vecs_z -= 4; + case 3: + if(cvar("g_shootfromclient") >= 2) // 2: allow center handedness + { + // center + vecs_y = 0; + vecs_z -= 4; + } + else + { + // right + } break; } } -- 2.39.2