diff options
author | Filip Gawin <filip.gawin@zoho.com> | 2020-02-25 20:01:56 +0100 |
---|---|---|
committer | Filip Gawin <filip.gawin@zoho.com> | 2020-03-22 17:30:54 +0100 |
commit | 8f01eab5ab97c498fd308c091ad9c555b2f67b56 (patch) | |
tree | c7b9b88d8b77ab3559be411dbbfeda98e3294c7b /src/control | |
parent | 7c425ac4ac17788b2a00bab7e9c4a1f1556d292f (diff) |
Fixes for Serge's review
Diffstat (limited to 'src/control')
-rw-r--r-- | src/control/Bridge.cpp | 14 | ||||
-rw-r--r-- | src/control/PathFind.cpp | 4 | ||||
-rw-r--r-- | src/control/Pickups.cpp | 2 | ||||
-rw-r--r-- | src/control/Script.cpp | 2 |
4 files changed, 11 insertions, 11 deletions
diff --git a/src/control/Bridge.cpp b/src/control/Bridge.cpp index dacb7aab..31214207 100644 --- a/src/control/Bridge.cpp +++ b/src/control/Bridge.cpp @@ -24,7 +24,7 @@ uint32& CBridge::TimeOfBridgeBecomingOperational = *(uint32*)0x8F2BC0; void CBridge::Init() { FindBridgeEntities(); - OldLift = -1.0; + OldLift = -1.0f; if (pLiftPart && pWeight) { DefaultZLiftPart = pLiftPart->GetPosition().z; @@ -60,32 +60,32 @@ void CBridge::Update() if (timeElapsed < 10000) { State = STATE_LIFT_PART_MOVING_DOWN; - liftHeight = 25.0 - timeElapsed / 10000.0 * 25.0; + liftHeight = 25.0 - timeElapsed / 10000.0 * 25.0f; } else if (timeElapsed < 40000) { - liftHeight = 0.0; + liftHeight = 0.0f; State = STATE_LIFT_PART_IS_DOWN; } else if (timeElapsed < 50000) { - liftHeight = 0.0; + liftHeight = 0.0f; State = STATE_LIFT_PART_ABOUT_TO_MOVE_UP; } else if (timeElapsed < 60000) { State = STATE_LIFT_PART_MOVING_UP; - liftHeight = (timeElapsed - 50000) / 10000.0 * 25.0; + liftHeight = (timeElapsed - 50000) / 10000.0 * 25.0f; } else { - liftHeight = 25.0; + liftHeight = 25.0f; State = STATE_LIFT_PART_IS_UP; } } else { - liftHeight = 25.0; + liftHeight = 25.0f; TimeOfBridgeBecomingOperational = 0; State = STATE_BRIDGE_LOCKED; } diff --git a/src/control/PathFind.cpp b/src/control/PathFind.cpp index 3a959049..daa27e57 100644 --- a/src/control/PathFind.cpp +++ b/src/control/PathFind.cpp @@ -991,7 +991,7 @@ float CPathFind::FindNodeOrientationForCarPlacement(int32 nodeId) { if(m_pathNodes[nodeId].numLinks == 0) - return 0.0; + return 0.0f; CVector dir = m_pathNodes[m_connections[m_pathNodes[nodeId].firstLink]].pos - m_pathNodes[nodeId].pos; dir.z = 0.0f; dir.Normalise(); @@ -1008,7 +1008,7 @@ CPathFind::FindNodeOrientationForCarPlacementFacingDestination(int32 nodeId, flo CVector dir; if(m_pathNodes[nodeId].numLinks == 0) - return 0.0; + return 0.0f; int bestNode = m_connections[m_pathNodes[nodeId].firstLink]; #ifdef FIX_BUGS diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp index 67c59101..b4ec7a0b 100644 --- a/src/control/Pickups.cpp +++ b/src/control/Pickups.cpp @@ -704,7 +704,7 @@ 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.0;
+ float radius = (double)(rand() & 0xF) * 0.1 + 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;
CCoronas::RegisterCorona( (uintptr)entity,
diff --git a/src/control/Script.cpp b/src/control/Script.cpp index 75c594cf..7c563492 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -174,7 +174,7 @@ void CMissionCleanup::Process() { CPopulation::m_AllRandomPedsThisType = -1; CPopulation::PedDensityMultiplier = 1.0f; - CCarCtrl::CarDensityMultiplier = 1.0; + CCarCtrl::CarDensityMultiplier = 1.0f; FindPlayerPed()->m_pWanted->m_fCrimeSensitivity = 1.0f; TheCamera.Restore(); TheCamera.SetWideScreenOff(); |