summaryrefslogtreecommitdiff
path: root/src/simulation/elements/DMG.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2012-10-11 22:14:14 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-10-26 14:11:43 (GMT)
commitb84460d79b35e3e410f9d5ee2cec93d7babc424f (patch)
treece98ecd27041a246aafa8cc7c84fcf061940a870 /src/simulation/elements/DMG.cpp
parent3f093c8072935ec25df10933ef23601dd2e614c3 (diff)
downloadpowder-b84460d79b35e3e410f9d5ee2cec93d7babc424f.zip
powder-b84460d79b35e3e410f9d5ee2cec93d7babc424f.tar.gz
visual studio compatibility, plus change text a little
Diffstat (limited to 'src/simulation/elements/DMG.cpp')
-rw-r--r--src/simulation/elements/DMG.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/simulation/elements/DMG.cpp b/src/simulation/elements/DMG.cpp
index 2e755d9..9c19199 100644
--- a/src/simulation/elements/DMG.cpp
+++ b/src/simulation/elements/DMG.cpp
@@ -67,13 +67,13 @@ int Element_DMG::update(UPDATE_FUNC_ARGS)
for (nxi=-rad; nxi<=rad; nxi++)
if (x+nxi>=0 && y+nxj>=0 && x+nxi<XRES && y+nxj<YRES && (nxi || nxj))
{
- dist = sqrt(pow(nxi, 2)+pow(nxj, 2));//;(pow((float)nxi,2))/(pow((float)rad,2))+(pow((float)nxj,2))/(pow((float)rad,2));
+ dist = sqrt(pow(nxi, 2.0f)+pow(nxj, 2.0f));//;(pow((float)nxi,2))/(pow((float)rad,2))+(pow((float)nxj,2))/(pow((float)rad,2));
if (!dist || (dist <= rad))
{
rr = pmap[y+nxj][x+nxi];
if (rr)
{
- angle = atan2(nxj, nxi);
+ angle = atan2((float)nxj, nxi);
fx = cos(angle) * 7.0f;
fy = sin(angle) * 7.0f;