806 for i:= 0 to cMaxHHIndex do |
806 for i:= 0 to cMaxHHIndex do |
807 with Hedgehogs[i] do |
807 with Hedgehogs[i] do |
808 if (Gear <> nil) and (Gear^.State and gsttmpFlag <> 0) then |
808 if (Gear <> nil) and (Gear^.State and gsttmpFlag <> 0) then |
809 begin |
809 begin |
810 DrawExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 50); |
810 DrawExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 50); |
|
811 AddFileLog('Carved a hole for hog at coordinates (' + inttostr(hwRound(Gear^.X)) + ',' + inttostr(hwRound(Gear^.Y)) + ')') |
|
812 end; |
|
813 // place flowers after in case holes overlap (we shrink search distance if we are failing to place) |
|
814 for p:= 0 to Pred(TeamsCount) do |
|
815 with TeamsArray[p]^ do |
|
816 for i:= 0 to cMaxHHIndex do |
|
817 with Hedgehogs[i] do |
|
818 if (Gear <> nil) and (Gear^.State and gsttmpFlag <> 0) then |
|
819 begin |
811 ForcePlaceOnLand(hwRound(Gear^.X) - SpritesData[sprTargetBee].Width div 2, |
820 ForcePlaceOnLand(hwRound(Gear^.X) - SpritesData[sprTargetBee].Width div 2, |
812 hwRound(Gear^.Y) - SpritesData[sprTargetBee].Height div 2, |
821 hwRound(Gear^.Y) - SpritesData[sprTargetBee].Height div 2, |
813 sprTargetBee, 0, lfBasic, $FFFFFFFF, false, false, false); |
822 sprTargetBee, 0, lfBasic, $FFFFFFFF, false, false, false); |
814 Gear^.Y:= int2hwFloat(hwRound(Gear^.Y) - 16 - Gear^.Radius); |
823 Gear^.Y:= int2hwFloat(hwRound(Gear^.Y) - 16 - Gear^.Radius); |
815 Gear^.State:= Gear^.State and not gsttmpFlag; |
824 Gear^.State:= Gear^.State and not gsttmpFlag; |