diff options
author | aap <aap@papnet.eu> | 2021-07-29 19:41:38 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2021-07-29 19:59:34 +0200 |
commit | 3f3e258d7769aa3522602687aea1119f32f3c589 (patch) | |
tree | ca6beec16a570275e5da7dc83d242e4ca4fb86f6 /src/entities | |
parent | Merge branch 'miami' into lcs (diff) | |
download | re3-3f3e258d7769aa3522602687aea1119f32f3c589.tar re3-3f3e258d7769aa3522602687aea1119f32f3c589.tar.gz re3-3f3e258d7769aa3522602687aea1119f32f3c589.tar.bz2 re3-3f3e258d7769aa3522602687aea1119f32f3c589.tar.lz re3-3f3e258d7769aa3522602687aea1119f32f3c589.tar.xz re3-3f3e258d7769aa3522602687aea1119f32f3c589.tar.zst re3-3f3e258d7769aa3522602687aea1119f32f3c589.zip |
Diffstat (limited to 'src/entities')
-rw-r--r-- | src/entities/Entity.cpp | 21 | ||||
-rw-r--r-- | src/entities/Entity.h | 8 |
2 files changed, 17 insertions, 12 deletions
diff --git a/src/entities/Entity.cpp b/src/entities/Entity.cpp index cd50923a..ed432e77 100644 --- a/src/entities/Entity.cpp +++ b/src/entities/Entity.cpp @@ -86,9 +86,9 @@ CEntity::CEntity(void) bHasPreRenderEffects = false; bIsTreeModel = false; - m_flagG2 = false; - m_flagG4 = false; - m_flagG8 = false; + bIsVehicle = false; + bIsPed = false; + bMakeVisible = false; m_scanCode = 0; m_modelIndex = -1; @@ -444,8 +444,11 @@ void CEntity::Render(void) { if(m_rwObject){ - if(CVisibilityPlugins::GetObjectDistanceAlpha(m_rwObject) != 0){ - // NB: LCS does not use bImBeingRendered here, +#ifdef VIS_DISTANCE_ALPHA + if(CVisibilityPlugins::GetObjectDistanceAlpha(m_rwObject) != 0) +#endif + { + // TODO(LCS): LCS does not use bImBeingRendered here, // but that may be due to the streamed world. better keep it for safety bImBeingRendered = true; if(RwObjectGetType(m_rwObject) == rpATOMIC) @@ -457,13 +460,12 @@ CEntity::Render(void) } } +#ifdef VIS_DISTANCE_ALPHA void CEntity::UpdateDistanceFade(void) { -// TODO(LCS): -// increasing and decreasing alpha depending on bDistanceFade doesn't make any sense -// so disable this whole thing until it does. -return; + // bDistanceFade is only valid when entity is in alpha list + // but we're always checking it here, see fix in CRenderer int alpha = CVisibilityPlugins::GetObjectDistanceAlpha(m_rwObject); if(CCutsceneMgr::IsRunning() || TheCamera.WorldViewerBeingUsed) alpha = 255; @@ -473,6 +475,7 @@ return; alpha = Min(alpha+32, 255); CVisibilityPlugins::SetObjectDistanceAlpha(m_rwObject, alpha); } +#endif void CEntity::UpdateAnim(void) diff --git a/src/entities/Entity.h b/src/entities/Entity.h index 239292c5..dbe8c6e2 100644 --- a/src/entities/Entity.h +++ b/src/entities/Entity.h @@ -100,9 +100,9 @@ public: // LCS flagsG uint32 bIsTreeModel : 1; - uint32 m_flagG2 : 1; - uint32 m_flagG4 : 1; - uint32 m_flagG8 : 1; + uint32 bIsVehicle : 1; // not sure what exactly these two are for + uint32 bIsPed : 1; + uint32 bMakeVisible : 1; uint16 m_scanCode; uint16 m_randomSeed; @@ -163,7 +163,9 @@ public: return (RpClump*)m_rwObject; } +#ifdef VIS_DISTANCE_ALPHA void UpdateDistanceFade(void); +#endif void GetBoundCentre(CVUVECTOR &out); CVector GetBoundCentre(void); float GetBoundRadius(void); |