diff options
author | erorcun <erayorcunus@gmail.com> | 2020-04-15 19:22:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-15 19:22:28 +0300 |
commit | 647cfbfd4554e975825fa48e1a87ea286704fc21 (patch) | |
tree | e3d7a2d0164ab5c0a7bc19617d2bbfa25bc1e2a1 /src/control | |
parent | eccc4a3a5b45253ad8a6bdacbfccb8a15299d334 (diff) | |
parent | 4da1879975ef28cb7f406166d62d154d03ef47d2 (diff) |
Merge pull request #446 from erorcun/erorcun
Many fixes and cleanup
Diffstat (limited to 'src/control')
-rw-r--r-- | src/control/Garages.cpp | 10 | ||||
-rw-r--r-- | src/control/Script.cpp | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp index d971d453..9bd9a577 100644 --- a/src/control/Garages.cpp +++ b/src/control/Garages.cpp @@ -307,13 +307,13 @@ void CGarage::Update() CGarages::bCamShouldBeOutisde = true; } if (pVehicle) { - if (IsEntityEntirelyOutside(pVehicle, 0.0f)) + if (!IsEntityEntirelyOutside(pVehicle, 0.0f)) TheCamera.pToGarageWeAreInForHackAvoidFirstPerson = this; if (pVehicle->GetModelIndex() == MI_MRWHOOP) { if (pVehicle->IsWithinArea( m_fX1 - DISTANCE_FOR_MRWHOOP_HACK, - m_fX2 + DISTANCE_FOR_MRWHOOP_HACK, - m_fY1 - DISTANCE_FOR_MRWHOOP_HACK, + m_fY1 + DISTANCE_FOR_MRWHOOP_HACK, + m_fX2 - DISTANCE_FOR_MRWHOOP_HACK, m_fY2 + DISTANCE_FOR_MRWHOOP_HACK)) { TheCamera.pToGarageWeAreIn = this; CGarages::bCamShouldBeOutisde = true; @@ -2313,6 +2313,10 @@ void CGarages::Load(uint8* buf, uint32 size) #ifdef FIX_GARAGE_SIZE VALIDATESAVEBUF(size); #endif + + MessageEndTime = 0; + bCamShouldBeOutisde = false; + MessageStartTime = 0; } bool diff --git a/src/control/Script.cpp b/src/control/Script.cpp index 1f085d32..83d072f3 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -11359,7 +11359,7 @@ VALIDATESAVEBUF(size) void CTheScripts::ClearSpaceForMissionEntity(const CVector& pos, CEntity* pEntity) { - static CColPoint aTempColPoints[32]; + static CColPoint aTempColPoints[MAX_COLLISION_POINTS]; int16 entities = 0; CEntity* aEntities[16]; CWorld::FindObjectsKindaColliding(pos, pEntity->GetBoundRadius(), false, &entities, 16, aEntities, false, true, true, false, false); |