summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-04-05 11:47:27 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-04-05 11:47:27 +0200
commit9436b5a8a58307ed859dc7d8528c512316548979 (patch)
treef24bfc3d5c348029acb606a22080d4b45277e7a7 /src/control
parentcranes init (diff)
parentMerge remote-tracking branch 'upstream/master' (diff)
downloadre3-9436b5a8a58307ed859dc7d8528c512316548979.tar
re3-9436b5a8a58307ed859dc7d8528c512316548979.tar.gz
re3-9436b5a8a58307ed859dc7d8528c512316548979.tar.bz2
re3-9436b5a8a58307ed859dc7d8528c512316548979.tar.lz
re3-9436b5a8a58307ed859dc7d8528c512316548979.tar.xz
re3-9436b5a8a58307ed859dc7d8528c512316548979.tar.zst
re3-9436b5a8a58307ed859dc7d8528c512316548979.zip
Diffstat (limited to 'src/control')
-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 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()