# HG changeset patch # User nemo # Date 1268578748 0 # Node ID c0c91cd3f4231bfbb04a2e6f97d620b299ae0863 # Parent d268a7fbb86817c62b54c5b49ae1250b118bde99 Trying to tweak kicks a bit diff -r d268a7fbb868 -r c0c91cd3f423 hedgewars/uVisualGears.pas --- a/hedgewars/uVisualGears.pas Sun Mar 14 14:47:21 2010 +0000 +++ b/hedgewars/uVisualGears.pas Sun Mar 14 14:59:08 2010 +0000 @@ -106,7 +106,14 @@ if hwRound(X) > cScreenWidth + LAND_WIDTH then X:= int2hwFloat(-cScreenWidth - 64); // if hwRound(Y) < (LAND_HEIGHT - 1024 - 75) then Y:= Y + int2hwFloat(25); // For if flag is set for flakes rising upwards? if hwRound(Y) > (LAND_HEIGHT + 75) then Y:= Y - int2hwFloat(1024 + 150); // TODO - configure in theme (jellies for example could use limited range) - if (Timer > 0) and (Timer-Steps > 0) then dec(Timer, Steps) + if (Timer > 0) and (Timer-Steps > 0) then + begin + tdX:= tdX - _0_005*Steps; + tdY:= tdY - _0_005*Steps; + if tdX < _0 then tdX:= _0; + if tdY < _0 then tdY:= _0; + dec(Timer, Steps) + end else begin Timer:= 0; @@ -622,12 +629,12 @@ if Gear^.Kind = vgtFlake then begin // Damage calc from doMakeExplosion - dmg:= dmgRadius + cHHRadius div 2 - hwRound(Distance(Gear^.X - int2hwFloat(X), Gear^.Y - int2hwFloat(Y))); + dmg:= min(100,dmgRadius*2 + cHHRadius div 2 - hwRound(Distance(Gear^.X - int2hwFloat(X), Gear^.Y - int2hwFloat(Y)))); if dmg > 1 then begin Gear^.tdX:= Gear^.dX + SignAs(_0_01 * dmg + cHHKick, Gear^.X - int2hwFloat(X)); Gear^.tdY:= Gear^.dY + SignAs(_0_01 * dmg + cHHKick, Gear^.Y - int2hwFloat(Y)); - Gear^.Timer:= 100 + Gear^.Timer:= 200 end end; t:= Gear^.NextGear