From 0ad39c020cfd4882b45bd1d26e521748e37b94a4 Mon Sep 17 00:00:00 2001 From: aap Date: Fri, 19 Jul 2019 13:58:19 +0200 Subject: implemented col line rendering --- src/render/Renderer.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/render/Renderer.cpp') 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, -- cgit v1.2.3