summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVittorio Romeo <vittorio.romeo@outlook.com>2013-07-14 01:37:47 +0200
committerVittorio Romeo <vittorio.romeo@outlook.com>2013-07-14 01:37:47 +0200
commitee7815c06d5b511940b912a4b5c6de75401ddecf (patch)
tree05e3c3de04636383b2ef5f2e1b73c482e445e71e
parentb2011923a21dadf76c4074ca5c5b9b2dd74d9cc8 (diff)
Float correctness2.0-preview
-rwxr-xr-x_RELEASE/Packs/VeeEvolution/Scripts/evolutionpatterns.lua2
-rwxr-xr-xsrc/SSVOpenHexagon/Core/HGUpdate.cpp2
-rwxr-xr-xsrc/SSVOpenHexagon/Core/HexagonGame.cpp4
-rwxr-xr-xsrc/SSVOpenHexagon/Core/MenuGame.cpp2
4 files changed, 5 insertions, 5 deletions
diff --git a/_RELEASE/Packs/VeeEvolution/Scripts/evolutionpatterns.lua b/_RELEASE/Packs/VeeEvolution/Scripts/evolutionpatterns.lua
index ae817659..c90df9c1 100755
--- a/_RELEASE/Packs/VeeEvolution/Scripts/evolutionpatterns.lua
+++ b/_RELEASE/Packs/VeeEvolution/Scripts/evolutionpatterns.lua
@@ -23,7 +23,7 @@ end
function wallHMCurveAcc(mSide, mCurve, mCurveAcc, mCurveMin, mCurveMax, mCurvePingPong)
if sync == true then
- mCurve = getLevelValueFloat("rotation_speed") * 10
+ mCurve = getLevelValueFloat("rotation_speed") * 10.0
mCurve = mCurve + (math.random(syncRndMin, syncRndMax) / 100.0)
end
diff --git a/src/SSVOpenHexagon/Core/HGUpdate.cpp b/src/SSVOpenHexagon/Core/HGUpdate.cpp
index 1c0c8723..f1deca3b 100755
--- a/src/SSVOpenHexagon/Core/HGUpdate.cpp
+++ b/src/SSVOpenHexagon/Core/HGUpdate.cpp
@@ -130,7 +130,7 @@ namespace hg
}
void HexagonGame::updateRotation(float mFrameTime)
{
- auto nextRotation = abs(getRotationSpeed()) * 10 * mFrameTime;
+ auto nextRotation = abs(getRotationSpeed()) * 10.f * mFrameTime;
if(status.fastSpin > 0)
{
nextRotation += abs((getSmootherStep(0, levelData.getValueFloat("fast_spin"), status.fastSpin) / 3.5f) * mFrameTime * 17.0f);
diff --git a/src/SSVOpenHexagon/Core/HexagonGame.cpp b/src/SSVOpenHexagon/Core/HexagonGame.cpp
index 3d0b7dd1..5ad23abb 100755
--- a/src/SSVOpenHexagon/Core/HexagonGame.cpp
+++ b/src/SSVOpenHexagon/Core/HexagonGame.cpp
@@ -84,7 +84,7 @@ namespace hg
runLuaFunction<void>("onLoad");
// Random rotation direction
- if(getRnd(0, 100) > 50) setRotationSpeed(getRotationSpeed() * -1);
+ if(getRnd(0, 100) > 50) setRotationSpeed(getRotationSpeed() * -1.f);
// Reset zoom
overlayCamera.setView({{getWidth() / 2.f, getHeight() / 2.f}, ssvs::Vec2f(getWidth(), getHeight())});
@@ -120,7 +120,7 @@ namespace hg
playSound("levelUp.ogg");
setRotationSpeed(levelData.getRotationSpeed() + levelData.getRotationSpeedIncrement() * getSign(getRotationSpeed()));
- setRotationSpeed(levelData.getRotationSpeed() * -1);
+ setRotationSpeed(levelData.getRotationSpeed() * -1.f);
if(status.fastSpin < 0 && abs(getRotationSpeed()) > levelData.getValueFloat("rotation_speed_max"))
setRotationSpeed(levelData.getValueFloat("rotation_speed_max") * getSign(getRotationSpeed()));
diff --git a/src/SSVOpenHexagon/Core/MenuGame.cpp b/src/SSVOpenHexagon/Core/MenuGame.cpp
index 2e27e7f0..754afdfa 100755
--- a/src/SSVOpenHexagon/Core/MenuGame.cpp
+++ b/src/SSVOpenHexagon/Core/MenuGame.cpp
@@ -335,7 +335,7 @@ namespace hg
if(state == States::PROFILE_NEW || state == States::ADD_FRIEND) { for(const auto& c : enteredChars) if(enteredString.size() < 16 && isalnum(c)) { playSound("beep.ogg"); enteredString.append(toStr(c)); } }
else if(state == States::PROFILES) { enteredString = getProfileNames()[profileIndex % getProfileNames().size()]; }
- else if(state == States::MAIN) { styleData.update(mFrameTime); backgroundCamera.rotate(levelData.getRotationSpeed() * 10 * mFrameTime); }
+ else if(state == States::MAIN) { styleData.update(mFrameTime); backgroundCamera.rotate(levelData.getRotationSpeed() * 10.f * mFrameTime); }
enteredChars.clear();
}