# HG changeset patch # User sheepluva # Date 1315805254 -7200 # Node ID 5cd329cf24605b54d495442d50355190b9553663 # Parent 4f2d8ce3732b70b8acc8438ee77a6742096e2bee nemo's molotov burst effect; with a slight color modification added diff -r 4f2d8ce3732b -r 5cd329cf2460 hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Mon Sep 12 06:31:10 2011 +0200 +++ b/hedgewars/GSHandlers.inc Mon Sep 12 07:27:34 2011 +0200 @@ -512,7 +512,7 @@ i, gX, gY: LongInt; dX, dY: hwFloat; Fire: PGear; - smoke: PVisualGear; + smoke, glass: PVisualGear; begin AllInactive := false; @@ -534,7 +534,17 @@ PlaySound(sndMolotov); gX := hwRound(Gear^.X); gY := hwRound(Gear^.Y); - //doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 5, EXPLAutoSound); + for i:= 0 to 2 do + begin + glass:= AddVisualGear(gx+random(7)-3, gy+random(5)-2, vgtEgg); + if glass <> nil then + begin + glass^.Frame:= 2; + glass^.Tint:= $41B83ED0 - i * $10081000; + glass^.dX:= 1/(10*(random(11)-5)); + glass^.dY:= -1/(random(4)+5); + end; + end; for i:= 0 to 24 do begin dX := AngleCos(i * 2) * ((_0_15*(i div 5))) * (GetRandom + _1); diff -r 4f2d8ce3732b -r 5cd329cf2460 hedgewars/VGSHandlers.inc --- a/hedgewars/VGSHandlers.inc Mon Sep 12 06:31:10 2011 +0200 +++ b/hedgewars/VGSHandlers.inc Mon Sep 12 07:27:34 2011 +0200 @@ -174,7 +174,10 @@ if Gear^.FrameTicks <= Steps then DeleteVisualGear(Gear) else - dec(Gear^.FrameTicks, Steps) + dec(Gear^.FrameTicks, Steps); + +if Gear^.FrameTicks < $FF then + Gear^.Tint:= (Gear^.Tint and $FFFFFF00) or Gear^.FrameTicks end; //////////////////////////////////////////////////////////////////////////////// diff -r 4f2d8ce3732b -r 5cd329cf2460 hedgewars/uVisualGears.pas --- a/hedgewars/uVisualGears.pas Mon Sep 12 06:31:10 2011 +0200 +++ b/hedgewars/uVisualGears.pas Mon Sep 12 07:27:34 2011 +0200 @@ -649,14 +649,7 @@ end; DrawRotatedF(sprFeather, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle); end; - vgtEgg: begin - if Gear^.FrameTicks < $FF then - begin - Tint($FF, $FF, $FF, Gear^.FrameTicks); - tinted:= true - end; - DrawRotatedF(sprEgg, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle); - end; + vgtEgg: DrawRotatedF(sprEgg, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle); vgtBeeTrace: begin if Gear^.FrameTicks < $FF then Tint($FF, $FF, $FF, Gear^.FrameTicks div 2)