summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/entities/Physical.cpp9
-rw-r--r--src/render/Renderer.cpp6
-rw-r--r--src/vehicles/Bike.h11
3 files changed, 20 insertions, 6 deletions
diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp
index f97194d0..1f62ef64 100644
--- a/src/entities/Physical.cpp
+++ b/src/entities/Physical.cpp
@@ -17,10 +17,11 @@
#include "CarCtrl.h"
#include "DMAudio.h"
#include "Automobile.h"
+#include "Bike.h"
#include "Pickups.h"
#include "Physical.h"
-//--MIAMI: file done except one bike thing
+//--MIAMI: file done
CPhysical::CPhysical(void)
{
@@ -2173,7 +2174,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(MIAMI)");
+ 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/render/Renderer.cpp b/src/render/Renderer.cpp
index f2f55b92..98dce4ac 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -7,6 +7,7 @@
#include "Ped.h"
#include "Vehicle.h"
#include "Heli.h"
+#include "Bike.h"
#include "Object.h"
#include "PathFind.h"
#include "Collision.h"
@@ -21,7 +22,7 @@
#include "Occlusion.h"
#include "Renderer.h"
-//--MIAMI: file almost done, just one bike flag left
+//--MIAMI: file done
bool gbShowCollisionPolys;
bool gbShowCollisionLines;
@@ -356,8 +357,7 @@ CRenderer::SetupEntityVisibility(CEntity *ent)
if(mi->GetModelType() != MITYPE_SIMPLE && mi->GetModelType() != MITYPE_WEAPON){
if(FindPlayerVehicle() == ent &&
TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_1STPERSON &&
-//TODO(MIAMI): that bike flag
- (!FindPlayerVehicle()->IsBike() || true)){
+ !(FindPlayerVehicle()->IsBike() && ((CBike*)FindPlayerVehicle())->m_bike_flag80)){
// Player's vehicle in first person mode
CVehicle *veh = (CVehicle*)ent;
int model = veh->GetModelIndex();
diff --git a/src/vehicles/Bike.h b/src/vehicles/Bike.h
index c8a5abd8..f68a9513 100644
--- a/src/vehicles/Bike.h
+++ b/src/vehicles/Bike.h
@@ -1,5 +1,7 @@
#pragma once
+#include "Skidmarks.h"
+
enum eBikeNodes {
BIKE_NODE_NONE,
BIKE_CHASSIS,
@@ -60,7 +62,14 @@ public:
uint32 field_47C;
uint8 m_bike_unused2;
uint8 unused[3]; // looks like padding..but for what?
- uint8 m_bike_flags;
+ uint8 m_bike_flag01 : 1;
+ uint8 m_bike_flag02 : 1;
+ uint8 m_bike_flag04 : 1;
+ uint8 m_bike_flag08 : 1;
+ uint8 m_bike_flag10 : 1;
+ uint8 m_bike_flag20 : 1;
+ uint8 m_bike_flag40 : 1;
+ uint8 m_bike_flag80 : 1;
int16 m_doingBurnout;
float m_fTireTemperature;
float someAngle;