DEADSOFTWARE

flamer projectiles don't push
authorfgsfds <pvt.fgsfds@gmail.com>
Wed, 16 Aug 2017 14:35:10 +0000 (17:35 +0300)
committerfgsfds <pvt.fgsfds@gmail.com>
Wed, 16 Aug 2017 14:35:10 +0000 (17:35 +0300)
src/game/g_weapons.pas

index 22fc69dd520dd148c7206a2d803607342fc22251..a008366b66617507e8fcb922b3b3e98c5169974e 100644 (file)
@@ -727,8 +727,9 @@ var
           if ChkTeam then
             if HitPlayer(gPlayers[i], d, obj^.Vel.X, obj^.Vel.Y, SpawnerUID, t) then
             begin
-              gPlayers[i].Push((obj^.Vel.X+obj^.Accel.X)*IfThen(t = HIT_BFG, 8, 1) div 4,
-                               (obj^.Vel.Y+obj^.Accel.Y)*IfThen(t = HIT_BFG, 8, 1) div 4);
+              if t <> HIT_FLAME then
+                gPlayers[i].Push((obj^.Vel.X+obj^.Accel.X)*IfThen(t = HIT_BFG, 8, 1) div 4,
+                                 (obj^.Vel.Y+obj^.Accel.Y)*IfThen(t = HIT_BFG, 8, 1) div 4);
               if t = HIT_BFG then
                 g_Game_DelayEvent(DE_BFGHIT, 1000, SpawnerUID);
               Result := True;
@@ -748,8 +749,9 @@ var
         if (gMonsters[i] <> nil) and gMonsters[i].Live and g_Obj_Collide(obj, @gMonsters[i].Obj) then
           if HitMonster(gMonsters[i], d, obj^.Vel.X, obj^.Vel.Y, SpawnerUID, t) then
           begin
-            gMonsters[i].Push((obj^.Vel.X+obj^.Accel.X)*IfThen(t = HIT_BFG, 8, 1) div 4,
-                              (obj^.Vel.Y+obj^.Accel.Y)*IfThen(t = HIT_BFG, 8, 1) div 4);
+            if t <> HIT_FLAME then
+              gMonsters[i].Push((obj^.Vel.X+obj^.Accel.X)*IfThen(t = HIT_BFG, 8, 1) div 4,
+                                (obj^.Vel.Y+obj^.Accel.Y)*IfThen(t = HIT_BFG, 8, 1) div 4);
             Result := True;
             break;
           end;