summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-11-27 19:18:51 +0300
committerNikolay Korolev <nickvnuk@gmail.com>2020-11-27 19:18:51 +0300
commitf50a53e2907bcadd5c89781c4d9c025a45c8a113 (patch)
tree0d2ad5a9df78804ea6de68d812a8793869715e4c
parent8c275c3e01059beb60fcdeb9bc599c762d949eab (diff)
fix garages
-rw-r--r--src/control/Garages.cpp10
m---------vendor/ogg0
m---------vendor/opus0
3 files changed, 5 insertions, 5 deletions
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp
index 5a04285f..fc8f84f2 100644
--- a/src/control/Garages.cpp
+++ b/src/control/Garages.cpp
@@ -1260,9 +1260,9 @@ bool CGarage::IsPlayerOutsideGarage()
bool CGarage::IsEntityTouching3D(CEntity * pEntity)
{
float radius = pEntity->GetBoundRadius();
- if (pEntity->GetPosition().x - radius < m_fX1 || pEntity->GetPosition().x + radius > m_fX2 ||
- pEntity->GetPosition().y - radius < m_fY1 || pEntity->GetPosition().y + radius > m_fY2 ||
- pEntity->GetPosition().z - radius < m_fZ1 || pEntity->GetPosition().z + radius > m_fZ2)
+ if (m_fX1 - radius > pEntity->GetPosition().x || m_fX2 + radius < pEntity->GetPosition().x ||
+ m_fY1 - radius > pEntity->GetPosition().y || m_fY2 + radius < pEntity->GetPosition().y ||
+ m_fZ1 - radius > pEntity->GetPosition().z || m_fZ2 + radius < pEntity->GetPosition().z)
return false;
CColModel* pColModel = pEntity->GetColModel();
for (int i = 0; i < pColModel->numSpheres; i++) {
@@ -1271,9 +1271,9 @@ bool CGarage::IsEntityTouching3D(CEntity * pEntity)
if (pos.x + radius > m_fX1 && pos.x - radius < m_fX2 &&
pos.y + radius > m_fY1 && pos.y - radius < m_fY2 &&
pos.z + radius > m_fZ1 && pos.z - radius < m_fZ2)
- return false;
+ return true;
}
- return true;
+ return false;
}
bool CGarage::EntityHasASphereWayOutsideGarage(CEntity * pEntity, float fMargin)
diff --git a/vendor/ogg b/vendor/ogg
-Subproject 36f969bb37559345ee03796ed625a9abd42c6db
+Subproject 31bd3f2707fb7dbae539a7093ba1fc4b2b37d84
diff --git a/vendor/opus b/vendor/opus
-Subproject 034c1b61a250457649d788bbf983b3f0fb63f02
+Subproject 841d57b82a516ccc6e90d1d4aee8d4a7f0d0001