# HG changeset patch # User sheepluva # Date 1315781269 -7200 # Node ID b9b9fb00c9dd389c668ab0a2f8b4549c3fbb6f13 # Parent 07eae0e35d73094c0c789825d7e5b86ff5525236 smoke for molotov diff -r 07eae0e35d73 -r b9b9fb00c9dd hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Sun Sep 11 18:09:49 2011 -0400 +++ b/hedgewars/GSHandlers.inc Mon Sep 12 00:47:49 2011 +0200 @@ -518,6 +518,11 @@ doStepFallingGear(Gear); CalcRotationDirAngle(Gear); + // let's add some smoke depending on speed + i:= max(32,152 - hwRound(Distance(Gear^.dX,Gear^.dY)*120)); + if (GameTicks mod i) = 0 then + AddVisualGear(hwRound(Gear^.X)-round(cos((Gear^.DirAngle+50) * pi / 180)*20), hwRound(Gear^.Y)-round(sin((Gear^.DirAngle+50) * pi / 180)*20), vgtSmoke); + if (Gear^.State and gstCollision) <> 0 then begin PlaySound(sndMolotov);