fix possible script runtime error in aim manager library

alut-include-path
Maikel de Vries 2017-01-23 09:47:52 +01:00
parent a89af833c7
commit 8d56434fc5
1 changed files with 3 additions and 3 deletions

View File

@ -254,10 +254,10 @@ public func StopAim()
private func DoStopAim()
{
if (!aim_weapon)
ResetHands();
if(!aim_weapon->~FinishedAiming(this, aim_angle)) // return 1 means the weapon goes on doing something (e.g. start aiming) then we don't reset
// Return true means the weapon goes on doing something (e.g. start aiming) then we don't reset.
if (!aim_weapon || !aim_weapon->~FinishedAiming(this, aim_angle))
ResetHands();
return;
}
public func StartShoot(object weapon)