summaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-08-07 11:34:41 +0200
committerSergeanur <s.anureev@yandex.ua>2020-08-07 11:34:41 +0200
commit7d8ffa9ebd32257d6aa59e27cd25a657a85613da (patch)
tree0eff46681a3524fd86a63bc8a0eb65b3c7409b5b /src/render
parentMerge pull request #670 from Fire-Head/miami (diff)
parentMerge pull request #675 from erorcun/master (diff)
downloadre3-7d8ffa9ebd32257d6aa59e27cd25a657a85613da.tar
re3-7d8ffa9ebd32257d6aa59e27cd25a657a85613da.tar.gz
re3-7d8ffa9ebd32257d6aa59e27cd25a657a85613da.tar.bz2
re3-7d8ffa9ebd32257d6aa59e27cd25a657a85613da.tar.lz
re3-7d8ffa9ebd32257d6aa59e27cd25a657a85613da.tar.xz
re3-7d8ffa9ebd32257d6aa59e27cd25a657a85613da.tar.zst
re3-7d8ffa9ebd32257d6aa59e27cd25a657a85613da.zip
Diffstat (limited to 'src/render')
-rw-r--r--src/render/Renderer.cpp6
-rw-r--r--src/render/Rubbish.h4
-rw-r--r--src/render/Shadows.cpp4
3 files changed, 12 insertions, 2 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 0640f25e..03ef1064 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -74,8 +74,12 @@ CRenderer::PreRender(void)
for(i = 0; i < ms_nNoOfVisibleEntities; i++)
ms_aVisibleEntityPtrs[i]->PreRender();
- for(i = 0; i < ms_nNoOfInVisibleEntities; i++)
+ for (i = 0; i < ms_nNoOfInVisibleEntities; i++) {
+#ifdef SQUEEZE_PERFORMANCE
+ if (ms_aInVisibleEntityPtrs[i]->IsVehicle() && ((CVehicle*)ms_aInVisibleEntityPtrs[i])->IsHeli())
+#endif
ms_aInVisibleEntityPtrs[i]->PreRender();
+ }
for(node = CVisibilityPlugins::m_alphaEntityList.head.next;
node != &CVisibilityPlugins::m_alphaEntityList.tail;
diff --git a/src/render/Rubbish.h b/src/render/Rubbish.h
index 52050e20..5a4e479b 100644
--- a/src/render/Rubbish.h
+++ b/src/render/Rubbish.h
@@ -4,7 +4,11 @@ class CVehicle;
enum {
// NB: not all values are allowed, check the code
+#ifdef SQUEEZE_PERFORMANCE
+ NUM_RUBBISH_SHEETS = 32
+#else
NUM_RUBBISH_SHEETS = 64
+#endif
};
class COneSheet
diff --git a/src/render/Shadows.cpp b/src/render/Shadows.cpp
index c22afa76..9b864d27 100644
--- a/src/render/Shadows.cpp
+++ b/src/render/Shadows.cpp
@@ -1585,7 +1585,9 @@ CShadows::CastShadowEntityXY(CEntity *pEntity, float fStartX, float fStartY, fl
CColTrianglePlane *pColTriPlanes = pCol->trianglePlanes;
ASSERT(pColTriPlanes != nil);
- if ( Abs(pColTriPlanes[i].normal.z) > 0.1f )
+ CVector normal;
+ pColTriPlanes[i].GetNormal(normal);
+ if ( Abs(normal.z) > 0.1f )
{
CColTriangle *pColTri = pCol->triangles;
ASSERT(pColTri != nil);