Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 66718 | Differences between
and this patch

Collapse All | Expand All

(-)src/atanks.cc (-4 / +9 lines)
Lines 1574-1580 Link Here
1574
	fi = global->stopwindow = updatename = scroll = 1;
1574
	fi = global->stopwindow = updatename = scroll = 1;
1575
	if (global->currentround != global->rounds) {
1575
	if (global->currentround != global->rounds) {
1576
		for (z = 0; z < global->numPlayers; z++) {
1576
		for (z = 0; z < global->numPlayers; z++) {
1577
			global->players[z]->money = (long int) (global->players[z]->money * global->interest);
1577
			double money = global->players[z]->money * global->interest;
1578
			global->players[z]->money = (money < LONG_MAX ? (long int) money : LONG_MAX);
1578
		}
1579
		}
1579
	}
1580
	}
1580
1581
Lines 2763-2772 Link Here
2763
					if (ltank->l <= 0 && !anyExploding) {
2764
					if (ltank->l <= 0 && !anyExploding) {
2764
						ltank->explode ();
2765
						ltank->explode ();
2765
						if (ltank->creditTo) {
2766
						if (ltank->creditTo) {
2767
							double money;
2766
							if (ltank->player != ltank->creditTo) {	//enemy destroyed
2768
							if (ltank->player != ltank->creditTo) {	//enemy destroyed
2767
								ltank->creditTo->money += (int)global->scoreUnitDestroyBonus;
2769
								money = ltank->creditTo->money + global->scoreUnitDestroyBonus;
2770
								ltank->creditTo->money = (money < LONG_MAX ? (long int)money : LONG_MAX);
2768
							} else {	//self destroy - ugh foolish one :))
2771
							} else {	//self destroy - ugh foolish one :))
2769
								ltank->creditTo->money -= (int)global->scoreUnitSelfDestroy;
2772
								money = ltank->creditTo->money - global->scoreUnitSelfDestroy;
2773
								ltank->creditTo->money = (money > LONG_MIN ? (long int)money : LONG_MIN);
2770
							}
2774
							}
2771
							ltank->creditTo = NULL;
2775
							ltank->creditTo = NULL;
2772
						}
2776
						}
Lines 2808-2814 Link Here
2808
								if (winner >= 0) {
2812
								if (winner >= 0) {
2809
									global->players[winner]->score++;
2813
									global->players[winner]->score++;
2810
									global->players[winner]->won++;
2814
									global->players[winner]->won++;
2811
									global->players[winner]->money += (long int)global->scoreRoundWinBonus;
2815
									double money = global->players[winner]->money + global->scoreRoundWinBonus;
2816
									global->players[winner]->money = (money < LONG_MAX ? (long int) money : LONG_MAX);
2812
								}
2817
								}
2813
								bCount = 0;
2818
								bCount = 0;
2814
								global->updateMenu = 1;
2819
								global->updateMenu = 1;

Return to bug 66718