summaryrefslogtreecommitdiff
path: root/src/elements/figh.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@Simons-Mac-Pro.local>2012-04-26 12:10:47 (GMT)
committer Simon Robertshaw <simon@Simons-Mac-Pro.local>2012-04-26 12:10:47 (GMT)
commitbb8a3f76e3b558a63eab38ab15ebb71f9b5ac762 (patch)
treeff63bd38df84018dc9843e5a5d26f5795b657735 /src/elements/figh.cpp
parent9e4cd165eb66b27a42f8eb3aad1993be5178d825 (diff)
downloadpowder-bb8a3f76e3b558a63eab38ab15ebb71f9b5ac762.zip
powder-bb8a3f76e3b558a63eab38ab15ebb71f9b5ac762.tar.gz
OS X compiling working, Make it a bit more friendly with stricter compilers
Diffstat (limited to 'src/elements/figh.cpp')
-rw-r--r--src/elements/figh.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/elements/figh.cpp b/src/elements/figh.cpp
index 6a8bb4e..6b67a27 100644
--- a/src/elements/figh.cpp
+++ b/src/elements/figh.cpp
@@ -11,8 +11,8 @@ int update_FIGH(UPDATE_FUNC_ARGS)
//Set target cords
if (sim->player.spwn && sim->player2.spwn)
{
- if ((pow(sim->player.legs[2]-x, 2) + pow(sim->player.legs[3]-y, 2))<=
- (pow(sim->player2.legs[2]-x, 2) + pow(sim->player2.legs[3]-y, 2)))
+ if ((pow((float)sim->player.legs[2]-x, 2) + pow((float)sim->player.legs[3]-y, 2))<=
+ (pow((float)sim->player2.legs[2]-x, 2) + pow((float)sim->player2.legs[3]-y, 2)))
{
tarx = (unsigned int)sim->player.legs[2];
tary = (unsigned int)sim->player.legs[3];
@@ -43,7 +43,7 @@ int update_FIGH(UPDATE_FUNC_ARGS)
switch (parts[i].tmp2)
{
case 1:
- if ((pow(tarx-x, 2) + pow(tary-y, 2))<600)
+ if ((pow(float(tarx-x), 2) + pow(float(tary-y), 2))<600)
{
if (figh->elem == PT_LIGH || figh->elem == PT_NEUT
|| sim->ptypes[figh->elem].properties&(PROP_DEADLY|PROP_RADIOACTIVE)