pausable 0
seta g_spawnshieldtime 1.000000 "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_trueaim_minrange 128 "TrueAim minimum range (TrueAim adjusts shots so they hit the crosshair point even though the gun is not at the screen center)"
set g_antilag_nudge 0 "don't touch"
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 1 "let client decide if it has the gun left or right; if set to 2, center handedness is allowed, and defaulted to, too; see also cl_gunalign"
cr_maxbullets = ReadByte();
+ g_trueaim_minrange = ReadCoord();
+
if(!postinit)
PostInit();
}
traceline(view_origin, view_origin + view_forward * MAX_SHOT_DISTANCE, mv, ta);
trueaimpoint = trace_endpos;
+ if(vlen(trueaimpoint - view_origin) < g_trueaim_minrange)
+ trueaimpoint = view_origin + view_forward * g_trueaim_minrange;
+
if(vecs_x > 0)
vecs_y = -vecs_y;
else
float g_balance_grenadelauncher_bouncestop;
float g_balance_electro_secondary_bouncefactor;
float g_balance_electro_secondary_bouncestop;
+float g_trueaim_minrange;
float autocvar_waypoint_benchmark;
float autocvar_welcome_message_time;
float autocvar_sv_gameplayfix_gravityunaffectedbyticrate;
+float autocvar_g_trueaim_minrange;
WriteByte(MSG_ENTITY, autocvar_g_balance_sniperrifle_secondary); // client has to know if it should zoom or not
WriteByte(MSG_ENTITY, serverflags); // client has to know if it should zoom or not
WriteByte(MSG_ENTITY, autocvar_g_balance_sniperrifle_magazinecapacity); // rifle max bullets
+ WriteCoord(MSG_ENTITY, autocvar_g_trueaim_minrange);
return TRUE;
}
v_right = vr;
v_up = vu;
+ // un-adjust trueaim if shotend is too close
+ if(vlen(w_shotend - (ent.origin + ent.view_ofs)) < autocvar_g_trueaim_minrange)
+ w_shotend = ent.origin + ent.view_ofs + s_forward * autocvar_g_trueaim_minrange;
+
// track max damage
if(accuracy_canbegooddamage(ent))
accuracy_add(ent, ent.weapon, maxdamage, 0);