From a057c2c1dcfc935e6393b7ec9a2f93a2397c117d Mon Sep 17 00:00:00 2001 From: binarymaster Date: Wed, 1 Mar 2017 23:12:08 +0300 Subject: [PATCH] fix turret and projectiles - turret with revenant auto-aim projectile - projectiles with angle of 90 or 270 --- src/game/g_basic.pas | 2 +- src/game/g_triggers.pas | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/game/g_basic.pas b/src/game/g_basic.pas index 132e76e..1705e0e 100644 --- a/src/game/g_basic.pas +++ b/src/game/g_basic.pas @@ -513,7 +513,7 @@ begin b := abs(vy); if a = 0 then - c := 0 + c := 90 else c := RadToDeg(ArcTan(b/a)); diff --git a/src/game/g_triggers.pas b/src/game/g_triggers.pas index 46f6a34..9ce8c0a 100644 --- a/src/game/g_triggers.pas +++ b/src/game/g_triggers.pas @@ -1938,7 +1938,11 @@ begin end; end; - else TargetUID := ActivateUID; + else begin + if (Data.ShotTarget <> TRIGGER_SHOT_TARGET_NONE) or + (Data.ShotType <> TRIGGER_SHOT_REV) then + TargetUID := ActivateUID; + end; end; if (Data.ShotTarget = TRIGGER_SHOT_TARGET_NONE) or (TargetUID > 0) then -- 2.29.2