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"
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;
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;
}