more CAutomobile::ProcessControl

This commit is contained in:
aap
2019-07-17 23:58:06 +02:00
parent fa98f40f7c
commit ba242bcf58
17 changed files with 605 additions and 37 deletions

View File

@ -16,3 +16,11 @@ WRAPPER bool CCarCtrl::JoinCarWithRoadSystemGotoCoors(CVehicle*, CVector, bool)
WRAPPER void CCarCtrl::JoinCarWithRoadSystem(CVehicle*) { EAXJMP(0x41F820); }
WRAPPER void CCarCtrl::SteerAICarWithPhysics(CVehicle*) { EAXJMP(0x41DA60); }
WRAPPER void CCarCtrl::UpdateCarOnRails(CVehicle*) { EAXJMP(0x418880); }
bool
CCarCtrl::MapCouldMoveInThisArea(float x, float y)
{
// bridge moves up and down
return x > -342.0f && x < -219.0f &&
y > -677.0f && y < -580.0f;
}

View File

@ -13,6 +13,7 @@ public:
static void JoinCarWithRoadSystem(CVehicle*);
static void SteerAICarWithPhysics(CVehicle*);
static void UpdateCarOnRails(CVehicle*);
static bool MapCouldMoveInThisArea(float x, float y);
static int32 &NumLawEnforcerCars;
static int32 &NumAmbulancesOnDuty;

View File

@ -718,7 +718,7 @@ void CReplay::ProcessCarUpdate(CVehicle *vehicle, float interpolation, CAddressI
}
vehicle->bEngineOn = true;
if (vehicle->IsCar())
((CAutomobile*)vehicle)->m_nWheelsOnGround = 4;
((CAutomobile*)vehicle)->m_nDriveWheelsOnGround = 4;
CWorld::Remove(vehicle);
CWorld::Add(vehicle);
if (vehicle->IsBoat())