diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-04-05 11:46:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-05 11:46:14 +0200 |
commit | 35a2cc29f7b25499068a2dda5ab0b0f22c4689d9 (patch) | |
tree | 000c9de98a1a8c06c0dfb08d355310dc73753cb9 /src/control | |
parent | Merge pull request #377 from Fire-Head/master (diff) | |
parent | Merge remote-tracking branch 'upstream/master' (diff) | |
download | re3-35a2cc29f7b25499068a2dda5ab0b0f22c4689d9.tar re3-35a2cc29f7b25499068a2dda5ab0b0f22c4689d9.tar.gz re3-35a2cc29f7b25499068a2dda5ab0b0f22c4689d9.tar.bz2 re3-35a2cc29f7b25499068a2dda5ab0b0f22c4689d9.tar.lz re3-35a2cc29f7b25499068a2dda5ab0b0f22c4689d9.tar.xz re3-35a2cc29f7b25499068a2dda5ab0b0f22c4689d9.tar.zst re3-35a2cc29f7b25499068a2dda5ab0b0f22c4689d9.zip |
Diffstat (limited to 'src/control')
-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() |