Package: atanks 1.5a
List,
    Not sure who this is to go to but here's the fix for atanks1.5a.
Please forward appropriately. C++ has two functions for abs() and it
looks like the author(s) of atanks wanted the (int) version.

    See
http://developers.sun.com/prodtech/cc/documentation/ss9_docs/mr/READMEs/c++_faq.html#bb12
for more information about abs().

    Please add a couple of type casts like I did below. Tested on FC4,
g++ 4.0.2.

FYI,
Mark Ramsell
------------------ fix -----------
$ diff src/player1.5a.cc src/player_new.cc

1041c1041
< (abs (ctank->x - cx) > radius))
---
> ((int) abs ((int) (ctank->x - cx)) >
radius))
1046c1046
< abs (ctank->x - cx) > radius)
---
> (int) abs ((int) (ctank->x - cx)) > radius)
1140c1140,1142
< _targetMatrix[(int)ctank->x] += sqrt
(abs (ctank->x - ltank->x)) * totalEffectiveDamage;
---
> _targetMatrix[(int)ctank->x] +=
> sqrt ((int) abs ((int) (ctank->x -
ltank->x))) *
> totalEffectiveDamage;





-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to