# HG changeset patch # User unc0rr # Date 1230497871 0 # Node ID 0a62938e695aa8be8261220c401b071395730915 # Parent 5657cd89668d0412e3ec494654d55bbc0e9882cc - Hellish bomb now spreads fire - Render different fire particle sprite frames at a time diff -r 5657cd89668d -r 0a62938e695a hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Sun Dec 28 15:58:40 2008 +0000 +++ b/hedgewars/GSHandlers.inc Sun Dec 28 20:57:51 2008 +0000 @@ -151,7 +151,16 @@ AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtMelonPiece, 0, dX, dY, 75)^.DirAngle:= i * 60; end end; - gtHellishBomb: doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 90, EXPLAutoSound); + gtHellishBomb: begin + doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 90, EXPLAutoSound); + for i:= 0 to 127 do + begin + dX:= AngleCos(i * 16) * _0_5 * (GetRandom + _1); + dY:= AngleSin(i * 16) * _0_5 * (GetRandom + _1); + AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtFlame, 0, dX, dY, 0); + AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtFlame, 0, dX, -dY, 0); + end + end; end; DeleteGear(Gear); exit @@ -1131,7 +1140,7 @@ Gear^.dX:= (Gear^.dX - cWindFactor) * _0_995 + cWindFactor; Gear^.dY:= Gear^.dY + cGravity; - if Gear^.dY > _0_1 then Gear^.dY:= Gear^.dY * _0_995; + if hwAbs(Gear^.dY) > _0_1 then Gear^.dY:= Gear^.dY * _0_995; Gear^.X:= Gear^.X + Gear^.dX; Gear^.Y:= Gear^.Y + Gear^.dY; diff -r 5657cd89668d -r 0a62938e695a hedgewars/uGears.pas --- a/hedgewars/uGears.pas Sun Dec 28 15:58:40 2008 +0000 +++ b/hedgewars/uGears.pas Sun Dec 28 20:57:51 2008 +0000 @@ -297,8 +297,11 @@ Result^.Tag:= Counter mod 64; Result^.Radius:= 1; Result^.Health:= 2; - Result^.dY:= (getrandom - _0_8) * _0_03; - Result^.dX:= (getrandom - _0_5) * _0_4 + if (Result^.dY.QWordValue = 0) and (Result^.dX.QWordValue = 0) then + begin + Result^.dY:= (getrandom - _0_8) * _0_03; + Result^.dX:= (getrandom - _0_5) * _0_4 + end end; gtFirePunch: begin Result^.Radius:= 15; @@ -1075,7 +1078,7 @@ gtDynamite: DrawSprite2(sprDynamite, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 25 + WorldDy, Gear^.Tag and 1, Gear^.Tag shr 1); gtClusterBomb: DrawRotated(sprClusterBomb, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle); gtCluster: DrawSprite(sprClusterParticle, hwRound(Gear^.X) - 8 + WorldDx, hwRound(Gear^.Y) - 8 + WorldDy, 0); - gtFlame: DrawSprite(sprFlame, hwRound(Gear^.X) - 8 + WorldDx, hwRound(Gear^.Y) - 8 + WorldDy,(GameTicks div 128 + Gear^.Angle) mod 8); + gtFlame: DrawSprite(sprFlame, hwRound(Gear^.X) - 8 + WorldDx, hwRound(Gear^.Y) - 8 + WorldDy,(GameTicks div 128 + Gear^.Tag) mod 8); gtParachute: DrawSprite(sprParachute, hwRound(Gear^.X) - 24 + WorldDx, hwRound(Gear^.Y) - 48 + WorldDy, 0); gtAirAttack: if Gear^.Tag > 0 then DrawSprite(sprAirplane, hwRound(Gear^.X) - 60 + WorldDx, hwRound(Gear^.Y) - 25 + WorldDy, 0) else DrawSprite(sprAirplane, hwRound(Gear^.X) - 60 + WorldDx, hwRound(Gear^.Y) - 25 + WorldDy, 1);