summaryrefslogtreecommitdiffstats
path: root/src/rw
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/rw/RwHelper.cpp2
-rw-r--r--src/rw/VisibilityPlugins.cpp14
2 files changed, 13 insertions, 3 deletions
diff --git a/src/rw/RwHelper.cpp b/src/rw/RwHelper.cpp
index ed618dd8..cb1d4ab5 100644
--- a/src/rw/RwHelper.cpp
+++ b/src/rw/RwHelper.cpp
@@ -13,6 +13,7 @@ RtCharset *debugCharset;
bool gPS2alphaTest = 1;
+#ifndef FINAL
static bool charsetOpen;
void OpenCharsetSafe()
{
@@ -20,6 +21,7 @@ void OpenCharsetSafe()
RtCharsetOpen();
charsetOpen = true;
}
+#endif
void CreateDebugFont()
{
diff --git a/src/rw/VisibilityPlugins.cpp b/src/rw/VisibilityPlugins.cpp
index 7dc27f48..5184860b 100644
--- a/src/rw/VisibilityPlugins.cpp
+++ b/src/rw/VisibilityPlugins.cpp
@@ -146,8 +146,12 @@ CVisibilityPlugins::RenderFadingEntities(void)
CEntity *e = node->item.entity;
if(e->m_rwObject == nil)
continue;
- mi = (CSimpleModelInfo*)CModelInfo::GetModelInfo(e->m_modelIndex);
+ mi = (CSimpleModelInfo *)CModelInfo::GetModelInfo(e->GetModelIndex());
+#ifdef FIX_BUGS
+ if(mi->GetModelType() == MITYPE_SIMPLE && mi->m_noZwrite)
+#else
if(mi->m_noZwrite)
+#endif
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, FALSE);
if(e->bDistanceFade){
@@ -159,7 +163,11 @@ CVisibilityPlugins::RenderFadingEntities(void)
}else
CRenderer::RenderOneNonRoad(e);
+#ifdef FIX_BUGS
+ if(mi->GetModelType() == MITYPE_SIMPLE && mi->m_noZwrite)
+#else
if(mi->m_noZwrite)
+#endif
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE);
}
}
@@ -718,7 +726,7 @@ CVisibilityPlugins::SetAtomicModelInfo(RpAtomic *atomic,
{
AtomicExt *ext = ATOMICEXT(atomic);
ext->modelInfo = modelInfo;
- switch(modelInfo->m_type)
+ switch (modelInfo->GetModelType())
case MITYPE_SIMPLE:
case MITYPE_TIME:
if(modelInfo->m_normalCull)
@@ -828,7 +836,7 @@ CVisibilityPlugins::SetClumpModelInfo(RpClump *clump, CClumpModelInfo *modelInfo
SetFrameHierarchyId(RpClumpGetFrame(clump), (int32)modelInfo);
// Unused
- switch(modelInfo->m_type){
+ switch (modelInfo->GetModelType()) {
// ignore MLO
case MITYPE_VEHICLE:
vmi = (CVehicleModelInfo*)modelInfo;