Skip to content
Permalink
Browse files

AimManager: fixed incorrect use of PauseUse leading to aiming without…

… holding CON_Use (#1691)

PauseUse can be called between ControlUseStart and ControlUseStop/Cancel. In this case ControlUseStop set aim_stop=1 but didn't actually stop reloading (which is somewhat fine). However, this led to PauseUse being called when e.g. tumbling or climbing.
And this again would lead to CON_Use being reissued even though the mouse button was not held down, leading to the Clonk being in aim mode.

The functional change here is that you will not continue reloading after tumbling/climbing when you are not holding down CON_Use anymore, which is consistent with other stuff.
  • Loading branch information...
walachey committed Jan 13, 2018
1 parent c3dfdc5 commit 825ad64afddd97fb637d18595204abf1fdc6914f
Showing with 1 addition and 1 deletion.
  1. +1 −1 planet/Objects.ocd/Libraries.ocd/AimManager.ocd/Script.c
@@ -121,7 +121,7 @@ func FxIntAimCheckProcedureStop(target, effect, reason, tmp)

func PauseAim()
{
if(!aim_weapon) return CancelAiming();
if(!aim_weapon || aim_stop) return CancelAiming();
// reissue the CON_Use command to the weapon when ready
this->PauseUse(aim_weapon);
CancelAiming();

0 comments on commit 825ad64

Please sign in to comment.
You can’t perform that action at this time.