# HG changeset patch # User unc0rr # Date 1331581588 -14400 # Node ID fb71556205f45d8149f7cee1cae08284f0dbd8fb # Parent 7a05f48bfa435e0be86cda466dd5d753c9c9346c Avoid local rate minimums around hog (within 15 pixels). Not tested. diff -r 7a05f48bfa43 -r fb71556205f4 hedgewars/uAIMisc.pas --- a/hedgewars/uAIMisc.pas Mon Mar 12 16:08:40 2012 +0400 +++ b/hedgewars/uAIMisc.pas Mon Mar 12 23:46:28 2012 +0400 @@ -195,8 +195,10 @@ with bonuses.ar[i] do begin r:= hwRound(Distance(Gear^.X - int2hwFloat(X), Gear^.Y - int2hwFloat(Y))); - if r < Radius then - inc(rate, Score * (Radius - r)) + if r < 15 then + inc(rate, Score * Radius) + else if r < Radius then + inc(rate, Score * (Radius - r)) end; RatePlace:= rate; end;