mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
High Gun Skill Fix (#22587)
This fixes a math error that caused sufficiently high firearms skill to wrap back around to less accurate guns. The fix is pretty simple, if the calculated dispersion (in degrees) is a negative number, it instead becomes 0. The dispersion math downstream of this effectively treats dispersion as a magnitude, meaning -15 degrees of dispersion was the same thing as 15 degrees, when the intended interaction was "Having -15 degrees of dispersion offsets the penalty from less accurate guns".
This commit is contained in:
@@ -461,7 +461,7 @@ ABSTRACT_TYPE(/obj/item/gun)
|
||||
break
|
||||
|
||||
var/acc = burst_accuracy[min(i, burst_accuracy.len)] - accuracy_decrease
|
||||
var/disp = dispersion[min(i, dispersion.len)] + dispersion_increase
|
||||
var/disp = max(0, dispersion[min(i, dispersion.len)] + dispersion_increase)
|
||||
process_accuracy(projectile, user, target, acc, disp)
|
||||
|
||||
if(pointblank)
|
||||
|
||||
Reference in New Issue
Block a user