summaryrefslogtreecommitdiff
path: root/src/simulation/elements/STKM.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-05-09 22:52:13 (GMT)
committer jacob1 <jfu614@gmail.com>2013-05-09 22:52:13 (GMT)
commit67e1213905edbd248ef4d434c3e5e53c151828a7 (patch)
tree09f8d223636ec67f20a46dac8205aa10d8608dc5 /src/simulation/elements/STKM.cpp
parente53f2bf0b5115917befc1f120a6731bca30e2024 (diff)
downloadpowder-67e1213905edbd248ef4d434c3e5e53c151828a7.zip
powder-67e1213905edbd248ef4d434c3e5e53c151828a7.tar.gz
fix tpt.message_box, fix compiling error
Diffstat (limited to 'src/simulation/elements/STKM.cpp')
-rw-r--r--src/simulation/elements/STKM.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/simulation/elements/STKM.cpp b/src/simulation/elements/STKM.cpp
index 55fac92..65fe189 100644
--- a/src/simulation/elements/STKM.cpp
+++ b/src/simulation/elements/STKM.cpp
@@ -130,13 +130,13 @@ int Element_STKM::run_stickman(playerst* playerp, UPDATE_FUNC_ARGS) {
float rbx = gvx;
float rby = gvy;
bool rbLowGrav = false;
- float tmp = fmaxf(fabsf(rbx), fabsf(rby));
+ float tmp = fabsf(rbx) > fabsf(rby)?fabsf(rbx):fabsf(rby);
if (tmp < 0.001f)
{
rbLowGrav = true;
rbx = -parts[i].vx;
rby = -parts[i].vy;
- tmp = fmaxf(fabsf(rbx), fabsf(rby));
+ tmp = fabsf(rbx) > fabsf(rby)?fabsf(rbx):fabsf(rby);
}
if (tmp < 0.001f)
{