Merge branch 'master' into garages_dev

This commit is contained in:
Nikolay Korolev
2020-04-05 12:47:27 +03:00
13 changed files with 808 additions and 59 deletions

View File

@ -1464,8 +1464,9 @@ void CGarage::UpdateDoorsHeight()
void CGarage::BuildRotatedDoorMatrix(CEntity * pDoor, float fPosition)
{
float fAngle = -fPosition * HALFPI;
CVector r(-Sin(fAngle) * pDoor->GetForward().x, Sin(fAngle) * pDoor->GetForward().y, Cos(fAngle) * pDoor->GetForward().z);
pDoor->GetRight() = CrossProduct(r, pDoor->GetForward());
CVector up(-Sin(fAngle) * pDoor->GetForward().y, Sin(fAngle) * pDoor->GetForward().z, Cos(fAngle));
pDoor->GetRight() = CrossProduct(up, pDoor->GetForward());
pDoor->GetUp() = up;
}
void CGarage::UpdateCrusherAngle()