fixed replay bug

This commit is contained in:
Nikolay Korolev 2020-09-26 21:12:47 +03:00
parent db1137b5a1
commit 796ad66d72

View File

@ -744,7 +744,7 @@ void CReplay::ProcessCarUpdate(CVehicle *vehicle, float interpolation, CAddressI
car->Damage.SetDoorStatus(DOOR_FRONT_LEFT, DOOR_STATUS_SWINGING); car->Damage.SetDoorStatus(DOOR_FRONT_LEFT, DOOR_STATUS_SWINGING);
if (vp->door_angles[1]) if (vp->door_angles[1])
car->Damage.SetDoorStatus(DOOR_FRONT_RIGHT, DOOR_STATUS_SWINGING); car->Damage.SetDoorStatus(DOOR_FRONT_RIGHT, DOOR_STATUS_SWINGING);
if (vp->door_status & 1 && car->Damage.GetDoorStatus(DOOR_BONNET) != DOOR_STATUS_MISSING){ if (vp->door_status & 1 && car->Damage.GetDoorStatus(DOOR_BONNET) != DOOR_STATUS_MISSING) {
car->Damage.SetDoorStatus(DOOR_BONNET, DOOR_STATUS_MISSING); car->Damage.SetDoorStatus(DOOR_BONNET, DOOR_STATUS_MISSING);
car->SetDoorDamage(CAR_BONNET, DOOR_BONNET, true); car->SetDoorDamage(CAR_BONNET, DOOR_BONNET, true);
} }
@ -768,6 +768,7 @@ void CReplay::ProcessCarUpdate(CVehicle *vehicle, float interpolation, CAddressI
car->Damage.SetDoorStatus(DOOR_REAR_RIGHT, DOOR_STATUS_MISSING); car->Damage.SetDoorStatus(DOOR_REAR_RIGHT, DOOR_STATUS_MISSING);
car->SetDoorDamage(CAR_DOOR_RR, DOOR_REAR_RIGHT, true); car->SetDoorDamage(CAR_DOOR_RR, DOOR_REAR_RIGHT, true);
} }
}
vehicle->bEngineOn = true; vehicle->bEngineOn = true;
if (vehicle->IsCar()) if (vehicle->IsCar())
((CAutomobile*)vehicle)->m_nDriveWheelsOnGround = 4; ((CAutomobile*)vehicle)->m_nDriveWheelsOnGround = 4;
@ -775,7 +776,6 @@ void CReplay::ProcessCarUpdate(CVehicle *vehicle, float interpolation, CAddressI
CWorld::Add(vehicle); CWorld::Add(vehicle);
if (vehicle->IsBoat()) if (vehicle->IsBoat())
((CBoat*)vehicle)->m_bIsAnchored = false; ((CBoat*)vehicle)->m_bIsAnchored = false;
}
} }
bool CReplay::PlayBackThisFrameInterpolation(CAddressInReplayBuffer *buffer, float interpolation, uint32 *pTimer){ bool CReplay::PlayBackThisFrameInterpolation(CAddressInReplayBuffer *buffer, float interpolation, uint32 *pTimer){