From: binarymaster Date: Wed, 1 Mar 2017 20:12:08 +0000 (+0300) Subject: fix turret and projectiles X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=a057c2c1dcfc935e6393b7ec9a2f93a2397c117d;p=d2df-sdl.git fix turret and projectiles - turret with revenant auto-aim projectile - projectiles with angle of 90 or 270 --- 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