Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix 3c047b1: AIGroup.GetProfitLastYear could get values different than those displayed in gui #7918
I found 23a2f23
But then, in the same window, the value it displays is computed in another way:
Both methods have their uses, I don't think that one is right and the other is wrong. However, for the AI function, it should follow the 2nd method of calculating profit, because I am getting a number out of it, same way I also get a number displayed in the Group GUI.
I couldn't do this. Everything was fine, except on autoreplace. It was getting the last profit of the new vehicle which was still 0, before the profit was copied over from the old.
…n those displayed in gui AIGroup.GetProfitLastYear was only accounting profits of vehicles which had an age higher than VEHICLE_PROFIT_MIN_AGE, which is different than what is displayed on group_gui widget WID_GL_INFO