summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2020-02-25 20:54:26 +0100
committerFilip Gawin <filip.gawin@zoho.com>2020-03-22 17:30:54 +0100
commitc88c2115e227ef0dbac6368224f1564159a9e2df (patch)
treed58a1ae9fa66ff43f6bf71aa020f9f78b66f7544 /src/control
parentFixes for Serge's review (diff)
downloadre3-c88c2115e227ef0dbac6368224f1564159a9e2df.tar
re3-c88c2115e227ef0dbac6368224f1564159a9e2df.tar.gz
re3-c88c2115e227ef0dbac6368224f1564159a9e2df.tar.bz2
re3-c88c2115e227ef0dbac6368224f1564159a9e2df.tar.lz
re3-c88c2115e227ef0dbac6368224f1564159a9e2df.tar.xz
re3-c88c2115e227ef0dbac6368224f1564159a9e2df.tar.zst
re3-c88c2115e227ef0dbac6368224f1564159a9e2df.zip
Diffstat (limited to 'src/control')
-rw-r--r--src/control/Bridge.cpp6
-rw-r--r--src/control/Pickups.cpp6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/control/Bridge.cpp b/src/control/Bridge.cpp
index 31214207..6a577449 100644
--- a/src/control/Bridge.cpp
+++ b/src/control/Bridge.cpp
@@ -60,7 +60,7 @@ void CBridge::Update()
if (timeElapsed < 10000)
{
State = STATE_LIFT_PART_MOVING_DOWN;
- liftHeight = 25.0 - timeElapsed / 10000.0 * 25.0f;
+ liftHeight = 25.0f - timeElapsed / 10000.0f * 25.0f;
}
else if (timeElapsed < 40000)
{
@@ -75,7 +75,7 @@ void CBridge::Update()
else if (timeElapsed < 60000)
{
State = STATE_LIFT_PART_MOVING_UP;
- liftHeight = (timeElapsed - 50000) / 10000.0 * 25.0f;
+ liftHeight = (timeElapsed - 50000) / 10000.0f * 25.0f;
}
else
{
@@ -151,4 +151,4 @@ STARTPATCHES
InjectHook(0x413D10, &CBridge::ShouldLightsBeFlashing, PATCH_JUMP);
InjectHook(0x413D20, &CBridge::FindBridgeEntities, PATCH_JUMP);
InjectHook(0x413DE0, &CBridge::ThisIsABridgeObjectMovingUp, PATCH_JUMP);
-ENDPATCHES \ No newline at end of file
+ENDPATCHES
diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp
index b4ec7a0b..c53cab3f 100644
--- a/src/control/Pickups.cpp
+++ b/src/control/Pickups.cpp
@@ -704,9 +704,9 @@ CPickups::DoPickUpEffects(CEntity *entity)
aWeaponReds[colorId] * colorModifier, aWeaponGreens[colorId] * colorModifier, aWeaponBlues[colorId] * colorModifier,
4.0f, 1.0f, 40.0f, false, 0.0f);
- float radius = (double)(rand() & 0xF) * 0.1 + 3.0f;
+ float radius = (rand() & 0xF) * 0.1f + 3.0f;
CPointLights::AddLight(CPointLights::LIGHT_POINT, pos, CVector(0.0f, 0.0f, 0.0f), radius, aWeaponReds[colorId] * modifiedSin / 256.0f, aWeaponGreens[colorId] * modifiedSin / 256.0f, aWeaponBlues[colorId] * modifiedSin / 256.0f, CPointLights::FOG_NONE, true);
- float size = (double)(rand() & 0xF) * 0.0005 + 0.6;
+ float size = (rand() & 0xF) * 0.0005f + 0.6f;
CCoronas::RegisterCorona( (uintptr)entity,
aWeaponReds[colorId] * modifiedSin / 2.0f, aWeaponGreens[colorId] * modifiedSin / 2.0f, aWeaponBlues[colorId] * modifiedSin / 2.0f,
255,
@@ -1044,4 +1044,4 @@ STARTPATCHES
InjectHook(0x433E40, CPickups::Save, PATCH_JUMP);
InjectHook(0x433BA0, &CPickup::GiveUsAPickUpObject, PATCH_JUMP);
InjectHook(0x430860, &CPickup::Update, PATCH_JUMP);
-ENDPATCHES \ No newline at end of file
+ENDPATCHES