mirror of
https://github.com/halpz/re3.git
synced 2025-07-24 02:19:48 +00:00
Pool fixes from master
This commit is contained in:
@ -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){
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user