summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-action/atanks/files/atanks-1.1.0-gcc4.patch')
-rw-r--r--games-action/atanks/files/atanks-1.1.0-gcc4.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/games-action/atanks/files/atanks-1.1.0-gcc4.patch b/games-action/atanks/files/atanks-1.1.0-gcc4.patch
new file mode 100644
index 000000000000..7b7d4b8f4aeb
--- /dev/null
+++ b/games-action/atanks/files/atanks-1.1.0-gcc4.patch
@@ -0,0 +1,27 @@
+diff -ur atanks-orig/src/player.cc atanks/src/player.cc
+--- atanks-orig/src/player.cc 2005-08-18 22:02:59.000000000 -0400
++++ atanks/src/player.cc 2005-08-18 22:05:58.000000000 -0400
+@@ -1009,12 +1009,12 @@
+ if (weapNum >= RIOT_CHARGE && weapNum <= RIOT_BLAST) {
+ // add points only within range and above ctank
+ if ( (cy > ctank->y - (radius / 2)) ||
+- (abs (ctank->x - cx) > radius))
++ (fabs (ctank->x - cx) > radius))
+ continue;
+ } else if (weapNum >= SML_ROLLER && weapNum <= DTH_ROLLER) {
+ // Only aim rollers above other tanks
+ if (cy > tankY + TANKHEIGHT &&
+- abs (ctank->x - cx) > radius)
++ fabs (ctank->x - cx) > radius)
+ continue;
+ } else if (weapNum >= SML_LAZER && weapNum <= LRG_LAZER) {
+ // Lazer can only be aimed above horizontal
+@@ -1085,7 +1085,7 @@
+ if (itemNum >= ITEM_VENGEANCE && itemNum <= ITEM_FATAL_FURY) {
+ // add sqrt distances for each tank * potential damage
+ long int totalEffectiveDamage = calcTotalEffectiveDamage (itemNum);
+- _targetMatrix[(int)ctank->x] += sqrt (abs (ctank->x - ltank->x)) * totalEffectiveDamage;
++ _targetMatrix[(int)ctank->x] += sqrt (fabs (ctank->x - ltank->x)) * totalEffectiveDamage;
+
+ }
+ }