Closed GoogleCodeExporter closed 8 years ago
Note: This was also the case in Deus Ex 2.0, and probably in the original
release of Deus Ex as well, not a bug introduced by this mod.
Original comment by lemong...@gmail.com
on 27 Dec 2012 at 8:24
I've isolated and fixed the problem here.
Explanation:
The weapon keeps two values (new random values chosen every 0.25 seconds or
so), one for how much the scope should wander up/down and one for how much it
should wander left/right. Each tick, those values are multiplied by the time
that has passed since the last tick, and adjusts your view rotation by those
values. The problem is that the view rotation itself is made of integers, so
"1.25" gets truncated to "1", and so forth. Most importantly, it means that any
adjustments below 1.0 (0.5, 0.2, etc.) get rounded down to zero, resulting in
strange behavior like weapon scopes that like to move only up/down or only
left/right, with a weird distribution of angles, or not at all, particularly at
high accuracy or with a high frame rate.
Now the game rounds the value intelligently before casting to an int, so a
value of 0.75 has a 75% chance of rounding to 1 and a 25% of rounding to 0, for
instance.
Original comment by lemong...@gmail.com
on 21 Feb 2013 at 6:50
Original issue reported on code.google.com by
lemong...@gmail.com
on 27 Dec 2012 at 8:18