Actually as it turns out, 15 is the maximum value at which the standing timer is relevant, sort of:Lork wrote:So here's an interesting one: As you all know, your accuracy is determined by how long you've been standing still. What some of you may have noticed is that after your accuracy is at its highest value, you can keep standing to gain a "grace period" wherein moving doesn't reduce your accuracy for a while. What seemingly none of us have noticed until now is that there's no upper limit to that. If you really wanted to, you could leave the game on overnight and build up 12+ hours worth of "standing time" with which to run around shooting things with perfect accuracy.
To fix, change the code that updates the standing timer:
DeusExWeapon.Tick()To something like this:Code: Select all
// if were standing still, increase the timer if (VSize(Owner.Velocity) < 10) standingTimer += deltaTime;
Note that 15 is just a number that I pulled out of my ass. For the real fix, you'd probably want to calculate the limit of the time to maximum accuracy with respect to the base accuracy of a weapon, and then add a few seconds onto that. Calculus was never one of my strong points, so I leave that part up to you guys.Code: Select all
// if were standing still, increase the timer if (VSize(Owner.Velocity) < 10 && standingTimer <= 15.0) standingTimer += deltaTime;
Code: Select all
if (standingTimer > 0)
{
// higher skill makes standing bonus greater
div = Max(15.0 + 29.0 * weapskill, 0.0);
accuracy -= FClamp(standingTimer/div, 0.0, 0.6);
// don't go too low
if ((accuracy < 0.1) && (tempacc > 0.1))
accuracy = 0.1;
}
Of course, with that Fclamp thrown in the max is closer to 9, but the math appears to be geared for a maximum of 15. Yes, you'd get SOME wiggle room when it came to moving after standing still for a while, but not too much, maybe a second's worth.