summaryrefslogtreecommitdiffstats
path: root/src/render/Renderer.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-07-19 13:58:19 +0200
committeraap <aap@papnet.eu>2019-07-19 13:58:19 +0200
commit0ad39c020cfd4882b45bd1d26e521748e37b94a4 (patch)
tree736fde80727300b695e649c18e67be340b384985 /src/render/Renderer.cpp
parentCAutomobile ctor, car spawner, fixes (diff)
downloadre3-0ad39c020cfd4882b45bd1d26e521748e37b94a4.tar
re3-0ad39c020cfd4882b45bd1d26e521748e37b94a4.tar.gz
re3-0ad39c020cfd4882b45bd1d26e521748e37b94a4.tar.bz2
re3-0ad39c020cfd4882b45bd1d26e521748e37b94a4.tar.lz
re3-0ad39c020cfd4882b45bd1d26e521748e37b94a4.tar.xz
re3-0ad39c020cfd4882b45bd1d26e521748e37b94a4.tar.zst
re3-0ad39c020cfd4882b45bd1d26e521748e37b94a4.zip
Diffstat (limited to '')
-rw-r--r--src/render/Renderer.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 69df63ba..7bf4593f 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -23,11 +23,13 @@
bool gbShowPedRoadGroups;
bool gbShowCarRoadGroups;
bool gbShowCollisionPolys;
+bool gbShowCollisionLines;
bool gbDontRenderBuildings;
bool gbDontRenderBigBuildings;
bool gbDontRenderPeds;
bool gbDontRenderObjects;
+bool gbDontRenderVehicles;
struct EntityInfo
{
@@ -132,6 +134,10 @@ CRenderer::RenderOneNonRoad(CEntity *e)
else if(e->IsObject() || e->IsDummy()){
if(gbDontRenderObjects)
return;
+ }else if(e->IsVehicle()){
+ // re3 addition
+ if(gbDontRenderVehicles)
+ return;
}
#endif
@@ -285,6 +291,21 @@ CRenderer::RenderFadingInEntities(void)
CVisibilityPlugins::RenderFadingEntities();
}
+void
+CRenderer::RenderCollisionLines(void)
+{
+ int i;
+
+ // game doesn't draw fading in entities
+ // this should probably be fixed
+ for(i = 0; i < ms_nNoOfVisibleEntities; i++){
+ CEntity *e = ms_aVisibleEntityPtrs[i];
+ if(Abs(e->GetPosition().x - ms_vecCameraPosition.x) < 100.0f &&
+ Abs(e->GetPosition().y - ms_vecCameraPosition.y) < 100.0f)
+ CCollision::DrawColModel(e->GetMatrix(), *e->GetColModel());
+ }
+}
+
enum Visbility
{
VIS_INVISIBLE,