]> git.pld-linux.org Git - packages/atanks.git/commitdiff
- fix building with gcc-3.4
authorgrzegol <grzegol@pld-linux.org>
Mon, 28 Jun 2004 21:42:56 +0000 (21:42 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    atanks-gcc34.patch -> 1.1

atanks-gcc34.patch [new file with mode: 0644]

diff --git a/atanks-gcc34.patch b/atanks-gcc34.patch
new file mode 100644 (file)
index 0000000..1bfd9a8
--- /dev/null
@@ -0,0 +1,27 @@
+diff -urN aa/atanks/src/player.cc atanks/src/player.cc
+--- aa/atanks/src/player.cc    2004-02-05 00:05:14.000000000 +0100
++++ atanks/src/player.cc       2004-06-28 23:39:27.517259680 +0200
+@@ -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))
++                              (abs ((int)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)
++                              abs ((int)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 (abs ((int)(ctank->x - ltank->x))) * totalEffectiveDamage;
+                       }
+               }
This page took 0.073488 seconds and 4 git commands to generate.