# HG changeset patch # User unc0rr # Date 1222641547 0 # Node ID 27bec661581cf84eea7af3cf72e0eeed0602aaaa # Parent 50198e5c7f0213e9926478785ed81ba4090b0f9b Start flames rework diff -r 50198e5c7f02 -r 27bec661581c hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Sun Sep 28 21:56:37 2008 +0000 +++ b/hedgewars/GSHandlers.inc Sun Sep 28 22:39:07 2008 +0000 @@ -1097,14 +1097,15 @@ end else begin if Gear^.Timer > 0 then dec(Gear^.Timer) else begin -// doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 2, 0); + AmmoShove(Gear, 5, 5); + doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 3, 0); dec(Gear^.Health); Gear^.Timer:= 1250 - Gear^.Angle * 12 end end; -if (((GameTicks div 8) mod 64) = Gear^.Angle) then - AmmoFlameWork(Gear); +//if (((GameTicks div 8) mod 64) = Gear^.Tag) then +// AmmoFlameWork(Gear); if Gear^.Health = 0 then DeleteGear(Gear) diff -r 50198e5c7f02 -r 27bec661581c hedgewars/uGears.pas --- a/hedgewars/uGears.pas Sun Sep 28 21:56:37 2008 +0000 +++ b/hedgewars/uGears.pas Sun Sep 28 22:39:07 2008 +0000 @@ -288,7 +288,7 @@ gtCluster: Result^.Radius:= 2; gtShover: Result^.Radius:= 20; gtFlame: begin - Result^.Angle:= Counter mod 64; + Result^.Tag:= Counter mod 64; Result^.Radius:= 1; Result^.Health:= 2; Result^.dY:= (getrandom - _0_8) * _0_03; @@ -1354,19 +1354,19 @@ begin t:= GearsList; while t <> nil do - begin - if (t^.Kind = gtHedgehog) and (t^.Y < Ammo^.Y) then - if not (hwSqr(Ammo^.X - t^.X) + hwSqr(Ammo^.Y - t^.Y - int2hwFloat(cHHRadius)) * 2 > _2) then - begin - inc(t^.Damage, 5); - t^.dX:= t^.dX + (t^.X - Ammo^.X) * _0_02; - t^.dY:= - _0_25; - t^.Active:= true; - DeleteCI(t); - FollowGear:= t - end; - t:= t^.NextGear - end; + begin + if (t^.Kind = gtHedgehog) and (t^.Y < Ammo^.Y) then + if not (hwSqr(Ammo^.X - t^.X) + hwSqr(Ammo^.Y - t^.Y - int2hwFloat(cHHRadius)) * 2 > _2) then + begin + inc(t^.Damage, 5); + t^.dX:= t^.dX + (t^.X - Ammo^.X) * _0_02; + t^.dY:= - _0_25; + t^.Active:= true; + DeleteCI(t); + FollowGear:= t + end; + t:= t^.NextGear + end; end; function CheckGearsNear(mX, mY: LongInt; Kind: TGearsType; rX, rY: LongInt): PGear; @@ -1406,6 +1406,7 @@ if (cCaseFactor = 0) or (CountGears(gtCase) >= 5) or (getrandom(cCaseFactor) <> 0) then exit; + FollowGear:= AddGear(0, 0, gtCase, 0, _0, _0, 0); case getrandom(2) of 0: begin diff -r 50198e5c7f02 -r 27bec661581c hedgewars/uMisc.pas --- a/hedgewars/uMisc.pas Sun Sep 28 21:56:37 2008 +0000 +++ b/hedgewars/uMisc.pas Sun Sep 28 22:39:07 2008 +0000 @@ -62,7 +62,7 @@ cExplosionBorderColor : LongWord = $808080; cShowFPS : boolean = true; - cCaseFactor : Longword = 5; {0..9} + cCaseFactor : Longword = 1;//5; {0..9} cLandAdditions: Longword = 4; cFullScreen : boolean = true; cLocaleFName : shortstring = 'en.txt';