summaryrefslogtreecommitdiffstats
path: root/src/vehicles
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/vehicles/Bike.cpp5
-rw-r--r--src/vehicles/Cranes.cpp6
-rw-r--r--src/vehicles/Cranes.h8
-rw-r--r--src/vehicles/Vehicle.h2
4 files changed, 11 insertions, 10 deletions
diff --git a/src/vehicles/Bike.cpp b/src/vehicles/Bike.cpp
index 30d63aca..faf31077 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
@@ -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);
diff --git a/src/vehicles/Cranes.h b/src/vehicles/Cranes.h
index 45ea7a8d..162f9af9 100644
--- a/src/vehicles/Cranes.h
+++ b/src/vehicles/Cranes.h
@@ -11,7 +11,7 @@ class CBuilding;
class CCrane
{
public:
- enum CraneState : uint8 {
+ enum CraneState {
IDLE = 0,
GOING_TOWARDS_TARGET = 1,
LIFTING_TARGET = 2,
@@ -19,7 +19,7 @@ public:
ROTATING_TARGET = 4,
DROPPING_TARGET = 5
};
- enum CraneStatus : uint8 {
+ enum CraneStatus {
NONE = 0,
ACTIVATED = 1,
DEACTIVATED = 2
@@ -46,8 +46,8 @@ public:
CVector2D m_vecHookVelocity;
CVehicle *m_pVehiclePickedUp;
uint32 m_nTimeForNextCheck;
- CraneStatus m_nCraneStatus;
- CraneState m_nCraneState;
+ uint8 m_nCraneStatus;
+ uint8 m_nCraneState;
uint8 m_nVehiclesCollected;
bool m_bIsCrusher;
bool m_bIsMilitaryCrane;
diff --git a/src/vehicles/Vehicle.h b/src/vehicles/Vehicle.h
index 004f1fd9..8f2686e1 100644
--- a/src/vehicles/Vehicle.h
+++ b/src/vehicles/Vehicle.h
@@ -281,7 +281,7 @@ public:
int8 m_comedyControlState;
CStoredCollPoly m_aCollPolys[2]; // poly which is under front/rear part of car
float m_fSteerInput;
- eVehicleType m_vehType;
+ uint8 m_vehType;
static void *operator new(size_t);
static void *operator new(size_t sz, int slot);