# HG changeset patch # User nemo # Date 1314482015 14400 # Node ID f1015857deb8fb26251e2bfe406f30df962d071a # Parent 10501c3279072e2084985705cfe499fc0c5f6889 Prevent flakes from drawing if they spawn in land diff -r 10501c327907 -r f1015857deb8 hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Sat Aug 27 16:13:40 2011 -0400 +++ b/hedgewars/GSHandlers.inc Sat Aug 27 17:53:35 2011 -0400 @@ -586,6 +586,7 @@ p: PLongwordArray; lf: LongWord; begin +inc(Gear^.Pos); gun:= (Gear^.State and gstTmpFlag) <> 0; move:= false; draw:= false; @@ -666,7 +667,7 @@ begin // we've collided with land. draw some stuff and get back into the clouds move:= true; - if (GameTicks > 20) and ((CurAmmoGear = nil) or (CurAmmoGear^.Kind <> gtRope)) then + if (Pos > 20) and ((CurAmmoGear = nil) or (CurAmmoGear^.Kind <> gtRope)) then begin ////////////////////////////////// TODO - ASK UNC0RR FOR A GOOD HOME FOR THIS //////////////////////////////////// if not gun then @@ -730,6 +731,7 @@ DeleteGear(Gear); exit end; + Gear^.Pos:= 0; Gear^.X:= int2hwFloat(GetRandom(LAND_WIDTH+1024)-512); Gear^.Y:= int2hwFloat(750+(GetRandom(50)-25)); Gear^.State:= Gear^.State or gstInvisible; diff -r 10501c327907 -r f1015857deb8 hedgewars/uGears.pas --- a/hedgewars/uGears.pas Sat Aug 27 16:13:40 2011 -0400 +++ b/hedgewars/uGears.pas Sat Aug 27 17:53:35 2011 -0400 @@ -289,6 +289,7 @@ gtFlake: begin with Gear^ do begin + Pos:= 0; Radius:= 1; DirAngle:= random * 360; dx.isNegative:= GetRandom(2) = 0;