diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-04-05 12:44:58 +0300 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-04-05 12:44:58 +0300 |
commit | 30b8d7300beb4f41cdaba27701a80f523301a268 (patch) | |
tree | 623cb97bb5f02dbad94bfdd50dc10e7d7aa1240d /src | |
parent | bd0cd13be1abab2b3001859c4af2f896c131a9c5 (diff) |
shoreside garage fix
Diffstat (limited to 'src')
-rw-r--r-- | src/control/Garages.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp index 68d58b10..7e9fc0fa 100644 --- a/src/control/Garages.cpp +++ b/src/control/Garages.cpp @@ -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() |