summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2257ac7)
raw | patch | inline | side by side (parent: 2257ac7)
author | fgsfds <pvt.fgsfds@gmail.com> | |
Sat, 12 Aug 2017 17:10:23 +0000 (20:10 +0300) | ||
committer | fgsfds <pvt.fgsfds@gmail.com> | |
Sat, 12 Aug 2017 17:10:23 +0000 (20:10 +0300) |
src/game/g_weapons.pas | patch | blob | history |
diff --git a/src/game/g_weapons.pas b/src/game/g_weapons.pas
index 6021daff58ecda40d6a0aceb210d69520ae25395..47de7ab9088588dea8be92a898179ae7c33bc7d5 100644 (file)
--- a/src/game/g_weapons.pas
+++ b/src/game/g_weapons.pas
// Äâèæåíèå:
spl := (ShotType <> WEAPON_PLASMA) and
(ShotType <> WEAPON_BFG) and
- (ShotType <> WEAPON_BSP_FIRE);
+ (ShotType <> WEAPON_BSP_FIRE) and
+ (ShotType <> WEAPON_FLAMETHROWER);
st := g_Obj_Move(@Obj, False, spl);
WEAPON_FLAMETHROWER: // Îãíåìåò
begin
- // Ïîä âîäîé íå ñòðåëÿåò, ñî âðåìåíåì óìèðàåò
- if (Timeout < 1) or WordBool(st and (MOVE_INWATER)) then
+ // Ñî âðåìåíåì óìèðàåò
+ if (Timeout < 1) then
begin
ShotType := 0;
Continue;
end;
+ // Ïîä âîäîé òîæå
+ if WordBool(st and (MOVE_HITWATER or MOVE_INWATER)) then
+ begin
+ if WordBool(st and MOVE_HITWATER) then
+ begin
+ if g_Frames_Get(_id, 'FRAMES_SMOKE') then
+ 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),
+ Anim, ONCEANIM_SMOKE);
+ Anim.Free();
+ end;
+ end
+ else
+ g_GFX_Bubbles(cx, cy, 1+Random(3), 16, 16);
+ ShotType := 0;
+ Continue;
+ end;
// Ãðàâèòàöèÿ
if Stopped = 0 then
Obj.Vel.X := 0;
Obj.Vel.Y := 0;
Obj.Accel.Y := 0;
- if WordBool(st and (MOVE_HITWALL or MOVE_HITWATER)) then
- Stopped := 1
- else
- Stopped := 2;
+ if WordBool(st and MOVE_HITWALL) then
+ Stopped := MOVE_HITWALL
+ else if WordBool(st and MOVE_HITLAND) then
+ Stopped := MOVE_HITLAND
+ else if WordBool(st and MOVE_HITCEIL) then
+ Stopped := MOVE_HITCEIL;
end;
- a := IfThen(Stopped = 0, 2, 1);
+ a := IfThen(Stopped = 0, 5, 1);
// Åñëè â êîãî-òî ïîïàëè
if g_Weapon_Hit(@Obj, a, SpawnerUID, HIT_FLAME, False) <> 0 then
begin
if g_Frames_Get(_id, 'FRAMES_FLAME') then
begin
- Anim := TAnimation.Create(_id, False, 3);
+ Anim := TAnimation.Create(_id, False, 2 + Random(2));
Anim.Alpha := 0;
case Stopped of
- 0: g_GFX_OnceAnim(cx-4+Random(8)-(Anim.Width div 2),
- cy-4+Random(8)-(Anim.Height div 2),
- Anim, ONCEANIM_SMOKE);
- 1: g_GFX_OnceAnim(cx-4+Random(8)-(Anim.Width div 2),
- cy-12+Random(24)-(Anim.Height div 2),
- Anim, ONCEANIM_SMOKE);
- 2: g_GFX_OnceAnim(cx-12+Random(24)-(Anim.Width div 2),
- cy-4+Random(8)-(Anim.Height div 2),
- Anim, ONCEANIM_SMOKE);
+ 0: g_GFX_OnceAnim(cx-4+Random(8)-(Anim.Width div 2),
+ cy-4+Random(8)-(Anim.Height div 2),
+ Anim, ONCEANIM_SMOKE);
+ 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);
end;
Anim.Free();
end;