DEADSOFTWARE

fix turret and projectiles
authorbinarymaster <x86corez@gmail.com>
Wed, 1 Mar 2017 20:12:08 +0000 (23:12 +0300)
committerbinarymaster <x86corez@gmail.com>
Wed, 1 Mar 2017 20:12:08 +0000 (23:12 +0300)
- turret with revenant auto-aim projectile
- projectiles with angle of 90 or 270

src/game/g_basic.pas
src/game/g_triggers.pas

index 132e76ee156f3aeb2c56eab19b16582201a059c6..1705e0e371054939c97ff485be59178684684f72 100644 (file)
@@ -513,7 +513,7 @@ begin
   b := abs(vy);
 
   if a = 0 then
-    c := 0
+    c := 90
   else
     c := RadToDeg(ArcTan(b/a));
 
index 46f6a34f6baef9e6205abccd7390dc7778fe2db5..9ce8c0affc12cd9b8884fa381e40bd8c103ae392 100644 (file)
@@ -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