summaryrefslogtreecommitdiffstats
path: root/src/render/Renderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/Renderer.cpp')
-rw-r--r--src/render/Renderer.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 406edc9f..f149c6fb 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -143,7 +143,8 @@ CRenderer::RenderOneNonRoad(CEntity *e)
resetLights = e->SetupLighting();
if(e->IsVehicle()){
- CVisibilityPlugins::SetupVehicleVariables(e->GetClump());
+ // unfortunately can't use GetClump here
+ CVisibilityPlugins::SetupVehicleVariables((RpClump*)e->m_rwObject);
CVisibilityPlugins::InitAlphaAtomicList();
}
@@ -1244,9 +1245,11 @@ CRenderer::ShouldModelBeStreamed(CEntity *ent, const CVector &campos)
void
CRenderer::RemoveVehiclePedLights(CEntity *ent, bool reset)
{
- if(ent->bRenderScorched)
- return;
- CPointLights::RemoveLightsAffectingObject();
- if(reset)
- ReSetAmbientAndDirectionalColours();
+ if(!ent->bRenderScorched){
+ CPointLights::RemoveLightsAffectingObject();
+ if(reset)
+ ReSetAmbientAndDirectionalColours();
+ }
+ SetAmbientColours();
+ DeActivateDirectional();
}