int startMoney; // the ammount of money we are meant to be sharing out
int players; // the number of players on the team
Player [] player; // an array of players on the team
int moneyToGive = startMoney/players; //how much each player gets
for(int i = 0; i< players;i++){
player[i].giveMoney(moneyToGive);
startMoney-= moneyToGive;
}
player[0].giveMoney(startMoney); //give the comm what is left (player[0] is the comm)
...
Last edited by madpeople on Thu Nov 13, 2008 1:48 pm, edited 1 time in total.
It looks like the game tracks how much the team is paid each time.
A quick test reveals that extra money not paid due to rounding error stays in the budget and is given out in later paychecks when there's enough to go around.
So the bug is not so much missing credits as delayed credits.
After looking into code and wasting a few of Imagos hours, I found out that there will be no missing credits...
Credits which will not given out on current payday, will be used for next payday.
Fixing the "problem" gets more complicated, the deeper you look into code.
PS:
Payday uses the same function like minerloads and starting money.
The Escapist (Justin Emerson) @ Dec 21 2010, 02:33 PM:
The history of open-source Allegiance is paved with the bodies of dead code branches, forum flame wars, and personal vendettas. But a community remains because people still love the game.
TurkeyXIII wrote:QUOTE (TurkeyXIII @ Nov 14 2008, 06:06 AM) A quick test reveals that extra money not paid due to rounding error stays in the budget and is given out in later paychecks when there's enough to go around.
So the bug is not so much missing credits as delayed credits.
DOG PROPERTY LAWS:
2. If it's in my mouth, it's mine.
[unless it tastes bad, then it is yours.]