diff options
author | 2005-08-19 02:31:54 +0000 | |
---|---|---|
committer | 2005-08-19 02:31:54 +0000 | |
commit | 5c8664ef779654594f13bfd58eb748e639fffabc (patch) | |
tree | e6e9d646bf9376999ddc4044ffc233a75afb98a0 /games-action/atanks/files | |
parent | stabilize #103017 (diff) | |
download | gentoo-2-5c8664ef779654594f13bfd58eb748e639fffabc.tar.gz gentoo-2-5c8664ef779654594f13bfd58eb748e639fffabc.tar.bz2 gentoo-2-5c8664ef779654594f13bfd58eb748e639fffabc.zip |
Fix compilation on GCC-4. Similar fix as was needed for gcc-3.4, but this one sucks less. Removed the old fix and apply this one in all cases since it doesn't break on gcc-3.3.
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'games-action/atanks/files')
-rw-r--r-- | games-action/atanks/files/atanks-1.1.0-gcc4.patch (renamed from games-action/atanks/files/atanks-gcc34.patch) | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/games-action/atanks/files/atanks-gcc34.patch b/games-action/atanks/files/atanks-1.1.0-gcc4.patch index d229923bff86..7b7d4b8f4aeb 100644 --- a/games-action/atanks/files/atanks-gcc34.patch +++ b/games-action/atanks/files/atanks-1.1.0-gcc4.patch @@ -1,18 +1,18 @@ diff -ur atanks-orig/src/player.cc atanks/src/player.cc ---- atanks-orig/src/player.cc 2004-09-04 02:12:37.847112834 -0400 -+++ atanks/src/player.cc 2004-09-04 02:17:54.685582198 -0400 +--- 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)) -+ (abs ((int)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) -+ abs ((int)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 @@ -21,7 +21,7 @@ diff -ur atanks-orig/src/player.cc atanks/src/player.cc // 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 - (int)ltank->x)) * totalEffectiveDamage; ++ _targetMatrix[(int)ctank->x] += sqrt (fabs (ctank->x - ltank->x)) * totalEffectiveDamage; } } |