diff options
author | aap <aap@papnet.eu> | 2020-05-07 12:48:57 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-05-07 12:48:57 +0200 |
commit | f5c0bf3b60d37cb0896bb12921b973aa258e6345 (patch) | |
tree | 70e0c6b29bae009d8bbd46787a85546305fcda52 /src/control/RoadBlocks.cpp | |
parent | few changes for vehicle model info (diff) | |
parent | Merge remote-tracking branch 'origin/master' into miami (diff) | |
download | re3-f5c0bf3b60d37cb0896bb12921b973aa258e6345.tar re3-f5c0bf3b60d37cb0896bb12921b973aa258e6345.tar.gz re3-f5c0bf3b60d37cb0896bb12921b973aa258e6345.tar.bz2 re3-f5c0bf3b60d37cb0896bb12921b973aa258e6345.tar.lz re3-f5c0bf3b60d37cb0896bb12921b973aa258e6345.tar.xz re3-f5c0bf3b60d37cb0896bb12921b973aa258e6345.tar.zst re3-f5c0bf3b60d37cb0896bb12921b973aa258e6345.zip |
Diffstat (limited to 'src/control/RoadBlocks.cpp')
-rw-r--r-- | src/control/RoadBlocks.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/control/RoadBlocks.cpp b/src/control/RoadBlocks.cpp index 3a271170..0261cd4a 100644 --- a/src/control/RoadBlocks.cpp +++ b/src/control/RoadBlocks.cpp @@ -82,8 +82,8 @@ CRoadBlocks::GenerateRoadBlockCopsForCar(CVehicle* pVehicle, int32 roadBlockType if (copType == COP_STREET) pCopPed->SetCurrentWeapon(WEAPONTYPE_COLT45); CPedPlacement::FindZCoorForPed(&posForZ); - pCopPed->m_matrix.GetPosition() = posForZ; - CVector vecSavedPos = pCopPed->m_matrix.GetPosition(); + pCopPed->SetPosition(posForZ); + CVector vecSavedPos = pCopPed->GetPosition(); pCopPed->m_matrix.SetRotate(0.0f, 0.0f, -HALFPI); pCopPed->m_matrix.GetPosition() += vecSavedPos; pCopPed->m_bIsDisabledCop = true; @@ -137,8 +137,8 @@ CRoadBlocks::GenerateRoadBlocks(void) float fModelRadius = 2.0f * pVehicleColModel->boundingSphere.radius + 0.25f; int16 radius = (int16)(fMapObjectRadius / fModelRadius); if (radius > 0 && radius < 6) { - CVector2D vecDistanceToCamera = TheCamera.GetPosition() - mapObject->m_matrix.GetPosition(); - float fDotProduct = DotProduct2D(vecDistanceToCamera, mapObject->m_matrix.GetUp()); + CVector2D vecDistanceToCamera = TheCamera.GetPosition() - mapObject->GetPosition(); + float fDotProduct = DotProduct2D(vecDistanceToCamera, mapObject->GetForward()); float fOffset = 0.5f * fModelRadius * (float)(radius - 1); for (int16 i = 0; i < radius; i++) { uint8 nRoadblockType = fDotProduct < 0.0f; @@ -178,7 +178,7 @@ CRoadBlocks::GenerateRoadBlocks(void) pVehicle->bExtendedRange = true; if (pVehicle->UsesSiren(pVehicle->GetModelIndex()) && CGeneral::GetRandomNumber() & 1) pVehicle->m_bSirenOrAlarm = true; - if (pVehicle->m_matrix.GetForward().z > 0.94f) { + if (pVehicle->GetForward().z > 0.94f) { CVisibilityPlugins::SetClumpAlpha(pVehicle->GetClump(), 0); CWorld::Add(pVehicle); pVehicle->bCreateRoadBlockPeds = true; |