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.
install-platforms
David Dormagen 2018-01-13 16:05:30 +01:00
parent c3dfdc5894
commit 825ad64afd
1 changed files with 1 additions and 1 deletions

View File

@ -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();