summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1fce622)
raw | patch | inline | side by side (parent: 1fce622)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Mon, 14 Aug 2017 13:52:29 +0000 (16:52 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Mon, 14 Aug 2017 13:52:53 +0000 (16:52 +0300) |
src/game/g_weapons.pas | patch | blob | history |
diff --git a/src/game/g_weapons.pas b/src/game/g_weapons.pas
index b5e46d11e930755b647728f1c8f9eae179555c98..4df78ad7533548aa4f98f97f29404278a35ba7df 100644 (file)
--- a/src/game/g_weapons.pas
+++ b/src/game/g_weapons.pas
procedure g_Weapon_flame(x, y, xd, yd: Integer; SpawnerUID: Word; WID: Integer = -1;
Silent: Boolean = False);
var
- find_id, FramesID: DWORD;
+ find_id: DWORD;
dx, dy: Integer;
begin
if WID < 0 then
o: TObj;
spl: Boolean;
Loud: Boolean;
+ tcx, tcy: Integer;
begin
if Shots = nil then
Exit;
begin
Anim := TAnimation.Create(_id, False, 3);
Anim.Alpha := 0;
- g_GFX_OnceAnim(cx-4+Random(8)-(Anim.Width div 2),
- cy-4+Random(8)-(Anim.Height div 2),
+ tcx := Random(8);
+ tcy := Random(8);
+ g_GFX_OnceAnim(cx-4+tcx-(Anim.Width div 2),
+ cy-4+tcy-(Anim.Height div 2),
Anim, ONCEANIM_SMOKE);
Anim.Free();
end;
Anim := TAnimation.Create(TextureID, False, 2 + Random(2));
Anim.Alpha := 0;
case Stopped of
- MOVE_HITWALL: g_GFX_OnceAnim(cx-4+Random(8)-(Anim.Width div 2),
- cy-12+Random(24)-(Anim.Height div 2),
- Anim, ONCEANIM_SMOKE);
- MOVE_HITLAND: g_GFX_OnceAnim(cx-12+Random(24)-(Anim.Width div 2),
- cy-10+Random(8)-(Anim.Height div 2),
- Anim, ONCEANIM_SMOKE);
- MOVE_HITCEIL: g_GFX_OnceAnim(cx-12+Random(24)-(Anim.Width div 2),
- cy+6+Random(8)-(Anim.Height div 2),
- Anim, ONCEANIM_SMOKE);
- else g_GFX_OnceAnim(cx-4+Random(8)-(Anim.Width div 2),
- cy-4+Random(8)-(Anim.Height div 2),
- Anim, ONCEANIM_SMOKE);
+ MOVE_HITWALL: begin tcx := cx-4+Random(8); tcy := cy-12+Random(24); end;
+ MOVE_HITLAND: begin tcx := cx-12+Random(24); tcy := cy-10+Random(8); end;
+ MOVE_HITCEIL: begin tcx := cx-12+Random(24); tcy := cy+6+Random(8); end;
+ else begin tcx := cx-4+Random(8); tcy := cy-4+Random(8); end;
end;
+ g_GFX_OnceAnim(tcx-(Anim.Width div 2), tcy-(Anim.Height div 2), Anim, ONCEANIM_SMOKE);
Anim.Free();
end;
end;