Follow-up Comment #4, bug #12632 (project wesnoth):

This bug seems caused by the division by zero done here:
ai.cpp:1234   vuln = it->vulnerability/it->support;
Probably introduced by r30333 from ESR:
http://svn.gna.org/viewcvs/wesnoth?rev=30333&view=rev

Btw ESR, seeing the workaround r31149, I don't know if you followed my
suggestion from comment #2, but I only said "similar line". The difference is
the use of 100 instead of 500.

I assume a typo but if not, note that it was 100 since early version of
wesnoth. Not sure what is the best value (I don't know this code), but I
suppose that it's a balance between performance and make the AI consider (or
not) distant target. Hard to tell without testing this on huge map or complex
maze. Anyway 500 MP is really a far target, and compute complex paths costing
more than 100 MP can be expensive.
Also don't forget that when the minimum operation was there (I suppose not a
rare case), the value used was often below 100.


    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?12632>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to