diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-10 16:54:13 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-10 16:54:13 +0200 |
commit | 00cdcef36aadf363bd216fb38281f18b072b19eb (patch) | |
tree | 3fc9855538dd26f4e6f213dc5cc2a49855fa03ec /src/control/Garages.cpp | |
parent | Merge remote-tracking branch 'upstream/miami' into miami (diff) | |
download | re3-00cdcef36aadf363bd216fb38281f18b072b19eb.tar re3-00cdcef36aadf363bd216fb38281f18b072b19eb.tar.gz re3-00cdcef36aadf363bd216fb38281f18b072b19eb.tar.bz2 re3-00cdcef36aadf363bd216fb38281f18b072b19eb.tar.lz re3-00cdcef36aadf363bd216fb38281f18b072b19eb.tar.xz re3-00cdcef36aadf363bd216fb38281f18b072b19eb.tar.zst re3-00cdcef36aadf363bd216fb38281f18b072b19eb.zip |
Diffstat (limited to '')
-rw-r--r-- | src/control/Garages.cpp | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp index 1b670dbe..d54d004a 100644 --- a/src/control/Garages.cpp +++ b/src/control/Garages.cpp @@ -197,17 +197,18 @@ void CGarages::Update(void) aGarages[GarageToBeTidied].TidyUpGarage(); } -int16 CGarages::AddOne(float X1, float Y1, float Z1, float X2, float Y2, float Z2, eGarageType type, int32 targetId) +int16 CGarages::AddOne(float X1, float Y1, float Z1, float X2, float Y2, float X3, float Y3, float Z2, eGarageType type, int32 targetId) { if (NumGarages >= NUM_GARAGES) { assert(0); return NumGarages++; } CGarage* pGarage = &aGarages[NumGarages]; - pGarage->m_fX1 = Min(X1, X2); - pGarage->m_fX2 = Max(X1, X2); - pGarage->m_fY1 = Min(Y1, Y2); - pGarage->m_fY2 = Max(Y1, Y2); + // TODO(MIAMI): proper! + pGarage->m_fX1 = Min(Min(X1, X2), X3); + pGarage->m_fX2 = Max(Max(X1, X2), X3); + pGarage->m_fY1 = Min(Min(Y1, Y2), Y3); + pGarage->m_fY2 = Max(Max(Y1, Y2), Y3); pGarage->m_fZ1 = Min(Z1, Z2); pGarage->m_fZ2 = Max(Z1, Z2); pGarage->m_pDoor1 = nil; @@ -2320,8 +2321,7 @@ void CGarages::Load(uint8* buf, uint32 size) bool CGarages::IsModelIndexADoor(uint32 id) { - return id == MI_GARAGEDOOR1 || - id == MI_GARAGEDOOR2 || + return id == MI_GARAGEDOOR2 || id == MI_GARAGEDOOR3 || id == MI_GARAGEDOOR4 || id == MI_GARAGEDOOR5 || @@ -2335,7 +2335,6 @@ CGarages::IsModelIndexADoor(uint32 id) id == MI_GARAGEDOOR14 || id == MI_GARAGEDOOR15 || id == MI_GARAGEDOOR16 || - id == MI_GARAGEDOOR17 || id == MI_GARAGEDOOR18 || id == MI_GARAGEDOOR19 || id == MI_GARAGEDOOR20 || @@ -2344,13 +2343,5 @@ CGarages::IsModelIndexADoor(uint32 id) id == MI_GARAGEDOOR23 || id == MI_GARAGEDOOR24 || id == MI_GARAGEDOOR25 || - id == MI_GARAGEDOOR26 || - id == MI_GARAGEDOOR27 || - id == MI_GARAGEDOOR28 || - id == MI_GARAGEDOOR29 || - id == MI_GARAGEDOOR30 || - id == MI_GARAGEDOOR31 || - id == MI_GARAGEDOOR32 || - id == MI_CRUSHERBODY || - id == MI_CRUSHERLID; + id == MI_GARAGEDOOR26; } |