From 579efc05fcfa2472b3aa6bfeb6c9cb491f6c3cb3 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Tue, 8 Dec 2020 05:26:48 +0200 Subject: Fix bike's fInAirXRes --- src/vehicles/Bike.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vehicles') diff --git a/src/vehicles/Bike.cpp b/src/vehicles/Bike.cpp index 30d63aca..3a0be35f 100644 --- a/src/vehicles/Bike.cpp +++ b/src/vehicles/Bike.cpp @@ -202,7 +202,7 @@ CVector vecTestResistance(0.9995f, 0.9f, 0.95f); float fDAxisX = 1.0f; float fDAxisXExtra = 100.0f; float fDAxisY = 1000.0f; -float fInAirXRes = 0.88f; +float fInAirXRes = 0.98f; float fFlySpeedMult = -0.6f; void -- cgit v1.2.3 From f3e9c82432a260fa88ed8bc1d4a7432fd4a4fdba Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Tue, 8 Dec 2020 07:52:03 +0200 Subject: Pool fixes from master --- src/vehicles/Bike.cpp | 3 ++- src/vehicles/Cranes.cpp | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/vehicles') diff --git a/src/vehicles/Bike.cpp b/src/vehicles/Bike.cpp index 3a0be35f..faf31077 100644 --- a/src/vehicles/Bike.cpp +++ b/src/vehicles/Bike.cpp @@ -1213,7 +1213,8 @@ CBike::ProcessControl(void) // Balance bike if(bBalancedByRider || bIsBeingPickedUp || bIsStanding){ - float onSideness = clamp(DotProduct(GetRight(), m_vecAvgSurfaceNormal), -1.0f, 1.0f); + float onSideness = DotProduct(GetRight(), m_vecAvgSurfaceNormal); + onSideness = clamp(onSideness, -1.0f, 1.0f); CVector worldCOM = Multiply3x3(GetMatrix(), m_vecCentreOfMass); // Keep bike upright if(bBalancedByRider){ diff --git a/src/vehicles/Cranes.cpp b/src/vehicles/Cranes.cpp index 2a571a67..8433a0ba 100644 --- a/src/vehicles/Cranes.cpp +++ b/src/vehicles/Cranes.cpp @@ -629,11 +629,11 @@ void CCranes::Save(uint8* buf, uint32* size) for (int i = 0; i < NUM_CRANES; i++) { CCrane *pCrane = WriteSaveBuf(buf, aCranes[i]); if (pCrane->m_pCraneEntity != nil) - pCrane->m_pCraneEntity = (CBuilding*)(CPools::GetBuildingPool()->GetJustIndex(pCrane->m_pCraneEntity) + 1); + pCrane->m_pCraneEntity = (CBuilding*)(CPools::GetBuildingPool()->GetJustIndex_NoFreeAssert(pCrane->m_pCraneEntity) + 1); if (pCrane->m_pHook != nil) - pCrane->m_pHook = (CObject*)(CPools::GetObjectPool()->GetJustIndex(pCrane->m_pHook) + 1); + pCrane->m_pHook = (CObject*)(CPools::GetObjectPool()->GetJustIndex_NoFreeAssert(pCrane->m_pHook) + 1); if (pCrane->m_pVehiclePickedUp != nil) - pCrane->m_pVehiclePickedUp = (CVehicle*)(CPools::GetVehiclePool()->GetJustIndex(pCrane->m_pVehiclePickedUp) + 1); + pCrane->m_pVehiclePickedUp = (CVehicle*)(CPools::GetVehiclePool()->GetJustIndex_NoFreeAssert(pCrane->m_pVehiclePickedUp) + 1); } VALIDATESAVEBUF(*size); -- cgit v1.2.3