From 2b592605ab043be56b5bbbf1ac06f223400dd2ef Mon Sep 17 00:00:00 2001 From: aap Date: Sat, 6 Jul 2019 12:27:21 +0200 Subject: misc classes finished --- src/entities/Object.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/entities/Object.cpp') diff --git a/src/entities/Object.cpp b/src/entities/Object.cpp index dbc38b9d..6712d77b 100644 --- a/src/entities/Object.cpp +++ b/src/entities/Object.cpp @@ -1,5 +1,7 @@ #include "common.h" #include "patcher.h" +#include "main.h" +#include "Lights.h" #include "Pools.h" #include "Radar.h" #include "Object.h" @@ -63,6 +65,26 @@ CObject::Render(void) CEntity::Render(); } +bool +CObject::SetupLighting(void) +{ + DeActivateDirectional(); + SetAmbientColours(); + + if(bRenderScorched){ + WorldReplaceNormalLightsWithScorched(Scene.world, 0.1f); + return true; + } + return false; +} + +void +CObject::RemoveLighting(bool reset) +{ + if(reset) + WorldReplaceScorchedLightsWithNormal(Scene.world); +} + WRAPPER void CObject::DeleteAllTempObjectInArea(CVector, float) { EAXJMP(0x4BBED0); } STARTPATCHES -- cgit v1.2.3