Use some GetMatrix/SetMatrix logic based on SA + CutsceneHead fix

This commit is contained in:
Sergeanur
2021-05-10 02:34:21 +03:00
parent f2b59f5097
commit 6537dfe7f1
13 changed files with 57 additions and 60 deletions

View File

@@ -1445,7 +1445,7 @@ CWorld::CallOffChaseForAreaSectorListVehicles(CPtrList &list, float x1, float y1
CColModel *pColModel = pVehicle->GetColModel();
bool bInsideSphere = false;
for(int32 i = 0; i < pColModel->numSpheres; i++) {
CVector pos = pVehicle->m_matrix * pColModel->spheres[i].center;
CVector pos = pVehicle->GetMatrix() * pColModel->spheres[i].center;
float fRadius = pColModel->spheres[i].radius;
if(pos.x + fRadius > x1 && pos.x - fRadius < x2 && pos.y + fRadius > y1 &&
pos.y - fRadius < y2)
@@ -1763,7 +1763,7 @@ CWorld::RepositionOneObject(CEntity *pEntity)
position.z = FindGroundZFor3DCoord(position.x, position.y,
position.z + OBJECT_REPOSITION_OFFSET_Z, nil) -
fBoundingBoxMinZ;
pEntity->m_matrix.UpdateRW();
pEntity->GetMatrix().UpdateRW();
pEntity->UpdateRwFrame();
} else if(modelId == MI_BUOY) {
float fWaterLevel = 0.0f;