diff options
author | aap <aap@papnet.eu> | 2020-05-19 20:56:42 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-05-19 20:56:42 +0200 |
commit | bdbe5d1080066073f063d653e80df6dbf4b326a2 (patch) | |
tree | bc4f8fd0f648bc38789591efe73d661ed2981998 /src/core | |
parent | Merge pull request #564 from Xinerki/miami (diff) | |
download | re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.tar re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.tar.gz re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.tar.bz2 re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.tar.lz re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.tar.xz re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.tar.zst re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/Camera.cpp | 11 | ||||
-rw-r--r-- | src/core/Camera.h | 1 | ||||
-rw-r--r-- | src/core/Placeable.cpp | 2 | ||||
-rw-r--r-- | src/core/Placeable.h | 1 | ||||
-rw-r--r-- | src/core/World.cpp | 24 |
5 files changed, 15 insertions, 24 deletions
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp index 1efe6bae..fa5e44bb 100644 --- a/src/core/Camera.cpp +++ b/src/core/Camera.cpp @@ -82,10 +82,6 @@ CCamera::CCamera(void) Init(); } -CCamera::CCamera(float) -{ -} - void CCamera::Init(void) { @@ -93,12 +89,7 @@ CCamera::Init(void) float fMouseAccelHorzntl = m_fMouseAccelHorzntl; float fMouseAccelVertical = m_fMouseAccelVertical; #endif -#ifdef FIX_BUGS - static const CCamera DummyCamera = CCamera(0.f); - *this = DummyCamera; -#else - memset(this, 0, sizeof(CCamera)); // getting rid of vtable, eh? -#endif + memset(this, 0, sizeof(CCamera)); // this is fine, no vtable #ifdef GTA3_1_1_PATCH m_fMouseAccelHorzntl = fMouseAccelHorzntl; m_fMouseAccelVertical = fMouseAccelVertical; diff --git a/src/core/Camera.h b/src/core/Camera.h index 8f2b6c51..135f9d8f 100644 --- a/src/core/Camera.h +++ b/src/core/Camera.h @@ -549,7 +549,6 @@ public: // High level and misc CCamera(void); - CCamera(float); void Init(void); void Process(void); void CamControl(void); diff --git a/src/core/Placeable.cpp b/src/core/Placeable.cpp index 69b3d3ea..6efc1540 100644 --- a/src/core/Placeable.cpp +++ b/src/core/Placeable.cpp @@ -7,8 +7,6 @@ CPlaceable::CPlaceable(void) m_matrix.SetScale(1.0f); } -CPlaceable::~CPlaceable(void) = default; - void CPlaceable::SetHeading(float angle) { diff --git a/src/core/Placeable.h b/src/core/Placeable.h index 970c0d48..22f7583c 100644 --- a/src/core/Placeable.h +++ b/src/core/Placeable.h @@ -9,7 +9,6 @@ public: CMatrix m_matrix; CPlaceable(void); - virtual ~CPlaceable(void); const CVector &GetPosition(void) { return m_matrix.GetPosition(); } void SetPosition(float x, float y, float z) { m_matrix.GetPosition().x = x; diff --git a/src/core/World.cpp b/src/core/World.cpp index f6817f8b..16e5e80d 100644 --- a/src/core/World.cpp +++ b/src/core/World.cpp @@ -1813,18 +1813,22 @@ void CWorld::RepositionOneObject(CEntity *pEntity) { int16 modelId = pEntity->GetModelIndex(); - if (IsTrafficLight(modelId) || IsTreeModel(modelId) || modelId == MI_PARKINGMETER || - modelId == MI_PHONEBOOTH1 || modelId == MI_WASTEBIN || modelId == MI_BIN || modelId == MI_POSTBOX1 || - modelId == MI_NEWSSTAND || modelId == MI_TRAFFICCONE || modelId == MI_DUMP1 || - modelId == MI_ROADWORKBARRIER1 || modelId == MI_BUSSIGN1 || modelId == MI_NOPARKINGSIGN1 || - modelId == MI_PHONESIGN || modelId == MI_TAXISIGN || modelId == MI_FISHSTALL01 || - modelId == MI_FISHSTALL02 || modelId == MI_FISHSTALL03 || modelId == MI_FISHSTALL04 || - modelId == MI_BAGELSTAND2 || modelId == MI_FIRE_HYDRANT || modelId == MI_BOLLARDLIGHT || - modelId == MI_PARKTABLE) { + if (modelId == MI_PARKINGMETER || modelId == MI_PHONEBOOTH1 || modelId == MI_WASTEBIN || + modelId == MI_BIN || modelId == MI_POSTBOX1 || modelId == MI_NEWSSTAND || modelId == MI_TRAFFICCONE || + modelId == MI_DUMP1 || modelId == MI_ROADWORKBARRIER1 || modelId == MI_BUSSIGN1 || modelId == MI_NOPARKINGSIGN1 || + modelId == MI_PHONESIGN || modelId == MI_FIRE_HYDRANT || modelId == MI_BOLLARDLIGHT || + modelId == MI_PARKTABLE || modelId == MI_PARKINGMETER2 || modelId == MI_TELPOLE02 || + modelId == MI_PARKBENCH || modelId == MI_BARRIER1 || IsTreeModel(modelId) +// TODO(MIAMI): this is actually a different case +|| IsStreetLight(modelId) + ) { CVector &position = pEntity->GetMatrix().GetPosition(); - float fBoundingBoxMinZ = pEntity->GetColModel()->boundingBox.min.z; + CColModel *pColModel = pEntity->GetColModel(); + float fBoundingBoxMinZ = pColModel->boundingBox.min.z; + float fHeight = pColModel->boundingBox.max.z - pColModel->boundingBox.min.z; + if(fHeight < OBJECT_REPOSITION_OFFSET_Z) fHeight = OBJECT_REPOSITION_OFFSET_Z; position.z = CWorld::FindGroundZFor3DCoord(position.x, position.y, - position.z + OBJECT_REPOSITION_OFFSET_Z, nil) - + position.z + fHeight, nil) - fBoundingBoxMinZ; pEntity->m_matrix.UpdateRW(); pEntity->UpdateRwFrame(); |