summaryrefslogtreecommitdiffstats
path: root/src/control/Garages.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-04-05 16:03:59 +0200
committerSergeanur <s.anureev@yandex.ua>2020-04-05 16:03:59 +0200
commit4fc2f9c359781fabe182fec88444ad540125fd40 (patch)
treeb068784c8e75aa87396a99f7399c88e90a150c59 /src/control/Garages.cpp
parentMerge remote-tracking branch 'origin/master' into MoreLanguages (diff)
parentfixed look behind bug (diff)
downloadre3-4fc2f9c359781fabe182fec88444ad540125fd40.tar
re3-4fc2f9c359781fabe182fec88444ad540125fd40.tar.gz
re3-4fc2f9c359781fabe182fec88444ad540125fd40.tar.bz2
re3-4fc2f9c359781fabe182fec88444ad540125fd40.tar.lz
re3-4fc2f9c359781fabe182fec88444ad540125fd40.tar.xz
re3-4fc2f9c359781fabe182fec88444ad540125fd40.tar.zst
re3-4fc2f9c359781fabe182fec88444ad540125fd40.zip
Diffstat (limited to 'src/control/Garages.cpp')
-rw-r--r--src/control/Garages.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp
index 2cb89444..6a91da76 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()