camera: prevent pitch increment with "preserve pitch" enabled

When clicking the compass, the vanilla camera will jitter randomly
within 5 values. With "compassLookPreservePitch" enabled, spam clicking
the compass would cause your camera pitch to rise repeatedly by that
random jitter. This places the camera pitch restore callback after the
random jitter, to eliminate that discrepancy.
This commit is contained in:
LlemonDuck
2021-06-02 12:53:08 -04:00
committed by Jordan Atwood
parent 8fe75748f9
commit 851d8a8de7

View File

@@ -47,11 +47,11 @@ LOOK:
iconst 0
sound_synth
iconst 225
sconst "lookPreservePitch"
runelite_callback
iconst 5
randominc
add
sconst "lookPreservePitch"
runelite_callback
iload 1 ; load target angle
cam_forceangle
return