# HG changeset patch # User sheepluva # Date 1461793963 -7200 # Node ID 20e0a72e0e2c93cedc6168c4cc8ada7d478a15df # Parent f146a3d71340a4aced8ab09f522d5c3473d63626 make hog fallback (flower-in-hole) positioning respect limits (e.g. used by gfDivideTeams) diff -r f146a3d71340 -r 20e0a72e0e2c hedgewars/uGears.pas --- a/hedgewars/uGears.pas Wed Apr 27 23:14:47 2016 +0200 +++ b/hedgewars/uGears.pas Wed Apr 27 23:52:43 2016 +0200 @@ -912,8 +912,7 @@ // divided teams: sort the hedgehogs from left to right by clan and shuffle clan members -// let's do this even after a possible section-divide, because some hogs may have spawned randomly on flowers -if divide then +if divide and (not sectionDivide) then SortHHsByClan(); end; diff -r f146a3d71340 -r 20e0a72e0e2c hedgewars/uGearsUtils.pas --- a/hedgewars/uGearsUtils.pas Wed Apr 27 23:14:47 2016 +0200 +++ b/hedgewars/uGearsUtils.pas Wed Apr 27 23:52:43 2016 +0200 @@ -939,7 +939,7 @@ while (cnt < 1000) do begin inc(cnt); - x:= leftX+GetRandom(rightX-leftX-32)+16; + x:= left+GetRandom(right-left-2*cHHRadius)+cHHRadius; y:= topY+GetRandom(LAND_HEIGHT-topY-64)+48; if NoGearsToAvoid(x, y, 100 div max(1,cnt div 100), 100 div max(1,cnt div 100)) then begin