few bike things

This commit is contained in:
aap 2020-06-02 15:26:11 +02:00
parent dbeaafbe99
commit 06c761e9ac
3 changed files with 20 additions and 6 deletions

View File

@ -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;
}
}
}

View File

@ -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();

View File

@ -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;