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 ++++++++++++++++++++++ src/entities/Object.h | 2 ++ 2 files changed, 24 insertions(+) (limited to 'src/entities') 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 diff --git a/src/entities/Object.h b/src/entities/Object.h index 3a8d62f2..de4c8e05 100644 --- a/src/entities/Object.h +++ b/src/entities/Object.h @@ -68,6 +68,8 @@ public: ~CObject(void); void Render(void); + bool SetupLighting(void); + void RemoveLighting(bool reset); void ObjectDamage(float amount); -- cgit v1.2.3