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/tank.cc (-1 / +2 lines)
Lines 171-177 Link Here
171
	sh -= (int)damage;
171
	sh -= (int)damage;
172
	if (creditTo) {
172
	if (creditTo) {
173
		if (player != creditTo) {	//enemy hit ++
173
		if (player != creditTo) {	//enemy hit ++
174
			creditTo->money += (int)(damage * _global->scoreHitUnit);
174
			double money =  damage * _global->scoreHitUnit;
175
			creditTo->money += (money < LONG_MAX ? (int)money : LONG_MAX);
175
			if ((int)player->type != HUMAN_PLAYER) {
176
			if ((int)player->type != HUMAN_PLAYER) {
176
				if (player->revenge == creditTo) {
177
				if (player->revenge == creditTo) {
177
					player->annoyanceFactor += damage;
178
					player->annoyanceFactor += damage;
(-)src/atanks.cc (-3 / +7 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 2764-2772 Link Here
2764
						ltank->explode ();
2765
						ltank->explode ();
2765
						if (ltank->creditTo) {
2766
						if (ltank->creditTo) {
2766
							if (ltank->player != ltank->creditTo) {	//enemy destroyed
2767
							if (ltank->player != ltank->creditTo) {	//enemy destroyed
2767
								ltank->creditTo->money += (int)global->scoreUnitDestroyBonus;
2768
								double money = ltank->creditTo->money + global->scoreUnitDestroyBonus;
2769
								ltank->creditTo->money = (money < LONG_MAX ? (long int)money : LONG_MAX);
2768
							} else {	//self destroy - ugh foolish one :))
2770
							} else {	//self destroy - ugh foolish one :))
2769
								ltank->creditTo->money -= (int)global->scoreUnitSelfDestroy;
2771
								ltank->creditTo->money -= (int)global->scoreUnitSelfDestroy;
2772
								if (ltank->creditTo->money < 0) ltank->creditTo->money = 0;
2770
							}
2773
							}
2771
							ltank->creditTo = NULL;
2774
							ltank->creditTo = NULL;
2772
						}
2775
						}
Lines 2808-2814 Link Here
2808
								if (winner >= 0) {
2811
								if (winner >= 0) {
2809
									global->players[winner]->score++;
2812
									global->players[winner]->score++;
2810
									global->players[winner]->won++;
2813
									global->players[winner]->won++;
2811
									global->players[winner]->money += (long int)global->scoreRoundWinBonus;
2814
									double money = global->players[winner]->money + global->scoreRoundWinBonus;
2815
									global->players[winner]->money = (money < LONG_MAX ? (long int) money : LONG_MAX);
2812
								}
2816
								}
2813
								bCount = 0;
2817
								bCount = 0;
2814
								global->updateMenu = 1;
2818
								global->updateMenu = 1;

Return to bug 66718