# HG changeset patch # User nemo # Date 1502307339 14400 # Node ID ac710bb12fbbb1544d929f9ee89339bfb36ca416 # Parent 48ee3777e42e9a4d7f9df73ee3a2df9f1e1a9506 Add checkins so that spawning on top of things is possible too diff -r 48ee3777e42e -r ac710bb12fbb hedgewars/uGears.pas --- a/hedgewars/uGears.pas Wed Aug 09 12:46:52 2017 -0400 +++ b/hedgewars/uGears.pas Wed Aug 09 15:35:39 2017 -0400 @@ -650,7 +650,10 @@ if Gear = nil then inc(unplaced) else + begin unplaced:= 0; + AddCI(Gear) + end; inc(i) end; @@ -882,6 +885,7 @@ FindPlace(Gear, false, t, t + playWidth div ClansCount, true);// could make Gear == nil; if Gear <> nil then begin + AddCI(Gear); Gear^.Pos:= GetRandom(49); // unless the world is wrapping, make outter teams face to map center if (WorldEdge <> weWrap) and ((p = 0) or (p = ClansCount - 1)) then @@ -916,6 +920,7 @@ FindPlace(ar[i]^.Gear, false, leftX, rightX, true); if ar[i]^.Gear <> nil then begin + AddCI(ar[i]^.Gear); ar[i]^.Gear^.dX.isNegative:= hwRound(ar[i]^.Gear^.X) > leftX + playWidth div 2; ar[i]^.Gear^.Pos:= GetRandom(19) end; @@ -943,6 +948,7 @@ hwRound(Gear^.Y) - SpritesData[sprTargetBee].Height div 2, sprTargetBee, 0, lfBasic, $FFFFFFFF, false, false, false); Gear^.Y:= int2hwFloat(hwRound(Gear^.Y) - 16 - Gear^.Radius); + AddCI(Gear); Gear^.State:= Gear^.State and (not gsttmpFlag); AddFileLog('Placed flower for hog at coordinates (' + inttostr(hwRound(Gear^.X)) + ',' + inttostr(hwRound(Gear^.Y)) + ')') end;