DEADSOFTWARE

more flamer shit again
[d2df-sdl.git] / src / game / g_weapons.pas
index 0b82e18f5343b542edcb69bfeb0f908f2f889233..2e2521b72f9956912574ac8a2eba69f71fe2ede4 100644 (file)
@@ -553,6 +553,7 @@ begin
         ShotType := WEAPON_FLAMETHROWER;
         Animation := nil;
         TextureID := 0;
+        g_Frames_Get(TextureID, 'FRAMES_FLAME');
         Stopped := 0;
       end;
     end;
@@ -1377,6 +1378,7 @@ begin
     triggers := nil;
     Animation := nil;
     TextureID := 0;
+    g_Frames_Get(TextureID, 'FRAMES_FLAME');
     Stopped := 0;
   end;
 
@@ -1697,7 +1699,7 @@ end;
 
 procedure g_Weapon_Update();
 var
-  i, a, h, cx, cy, oldvx, oldvy: Integer;
+  i, a, h, cx, cy, oldvx, oldvy, tf: Integer;
   _id: DWORD;
   Anim: TAnimation;
   t: DWArray;
@@ -1933,7 +1935,7 @@ begin
                 Stopped := MOVE_HITCEIL;
             end;
 
-            a := IfThen(Stopped = 0, 5, 1);
+            a := IfThen(Stopped = 0, 3, 1);
           // Åñëè â êîãî-òî ïîïàëè
             if g_Weapon_Hit(@Obj, a, SpawnerUID, HIT_FLAME, False) <> 0 then
             begin
@@ -1943,9 +1945,14 @@ begin
                 ShotType := 0;
             end;
 
-            if g_Frames_Get(_id, 'FRAMES_FLAME') and (gTime mod 2 = 0) then
+            if Stopped = 0 then
+              tf := 2
+            else
+              tf := 3;
+
+            if (gTime mod tf = 0) then
             begin
-              Anim := TAnimation.Create(_id, False, 2 + Random(2));
+              Anim := TAnimation.Create(TextureID, False, 2 + Random(2));
               Anim.Alpha := 0;
               case Stopped of
                 0:             g_GFX_OnceAnim(cx-4+Random(8)-(Anim.Width div 2),
@@ -2124,7 +2131,7 @@ begin
           begin
             if (Shots[i].ShotType = WEAPON_ROCKETLAUNCHER) then
               e_DrawAdv(TextureID, Obj.X, Obj.Y, 0, True, False, a, @p, M_NONE)
-            else
+            else if (Shots[i].ShotType <> WEAPON_FLAMETHROWER) then
               e_Draw(TextureID, Obj.X, Obj.Y, 0, True, False);
           end;