summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/entities/Physical.cpp7
-rw-r--r--src/peds/Population.cpp7
-rw-r--r--src/vehicles/Bike.h10
3 files changed, 20 insertions, 4 deletions
diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp
index 04cec96b..4fc53039 100644
--- a/src/entities/Physical.cpp
+++ b/src/entities/Physical.cpp
@@ -16,6 +16,7 @@
#include "DMAudio.h"
#include "Automobile.h"
#include "Physical.h"
+#include "Bike.h"
CPhysical::CPhysical(void)
{
@@ -1917,7 +1918,11 @@ CPhysical::ProcessCollision(void)
car->m_aSuspensionSpringRatio[2] = 1.0f;
car->m_aSuspensionSpringRatio[3] = 1.0f;
}else if(veh->m_vehType == VEHICLE_TYPE_BIKE){
- assert(0 && "TODO - but unused");
+ CBike* bike = (CBike*)this;
+ bike->m_aSuspensionSpringRatio[0] = 1.0f;
+ bike->m_aSuspensionSpringRatio[1] = 1.0f;
+ bike->m_aSuspensionSpringRatio[2] = 1.0f;
+ bike->m_aSuspensionSpringRatio[3] = 1.0f;
}
}
}
diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp
index 5dbde649..35443cb8 100644
--- a/src/peds/Population.cpp
+++ b/src/peds/Population.cpp
@@ -22,6 +22,7 @@
#include "DummyObject.h"
#include "Script.h"
#include "Shadows.h"
+#include "Bike.h"
#define MIN_CREATION_DIST 40.0f // not for start of the game (look at the GeneratePedsAtStartOfGame)
#define CREATION_RANGE 10.0f // added over the MIN_CREATION_DIST.
@@ -833,11 +834,11 @@ CPopulation::AddPedInCar(CVehicle* car)
newPed->SetCurrentWeapon(WEAPONTYPE_COLT45);
newPed->RemoveWeaponModel(CWeaponInfo::GetWeaponInfo(newPed->GetWeapon()->m_eWeaponType)->m_nModelId);
}
- /*
+
// Miami leftover
if (car->m_vehType == VEHICLE_TYPE_BIKE) {
- newPed->m_pVehicleAnim = CAnimManager::BlendAnimation(newPed->GetClump(), ASSOCGRP_STD, *((CBike*)car + 308h), 100.0f);
- } else */
+ newPed->m_pVehicleAnim = CAnimManager::BlendAnimation(newPed->GetClump(), ASSOCGRP_STD, ((CBike*)car)->m_bikeSitAnimation, 100.0f);
+ } else
// FIX: Make peds comfortable while driving car/boat
#ifdef FIX_BUGS
diff --git a/src/vehicles/Bike.h b/src/vehicles/Bike.h
index 4e7e5a0e..38477e80 100644
--- a/src/vehicles/Bike.h
+++ b/src/vehicles/Bike.h
@@ -12,4 +12,14 @@ enum eBikeNodes {
BIKE_MUDGUARD,
BIKE_HANDLEBARS,
BIKE_NUM_NODES
+};
+
+class CBike : public CVehicle
+{
+public:
+ RwFrame *m_aBikeNodes[BIKE_NUM_NODES]; // assuming
+ uint8 unk1[96];
+ AnimationId m_bikeSitAnimation;
+ uint8 unk2[180];
+ float m_aSuspensionSpringRatio[4];
}; \ No newline at end of file