Forage oddness
This looks odd to me, and I thought I'd run it by folks who know the code. By the way, if I created a local fix I have no idea how I'd communicate it to anyone. I assume commit privileges are not just given to everyone.
Anyhow, in forage.cpp (rev 2103), on line #111 the variable chancepool is repeatedly overwritten inside the loop. (I assume this was intended to be a += instead of =)
Next, on line #132 we have rindex being assigned a random value. (Why am I thinking of string operations now...) So far, so good. But below, it is compared against each of the chance values (from the forage table). I suspect that this loop is missing something like "rindex -= chance[i]"
I'm not 100% sure that this is a fair distribution of probability, but it looks like it would be better than what is in there.
|