diff options
author | aap <aap@papnet.eu> | 2019-07-06 12:27:21 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2019-07-06 12:27:21 +0200 |
commit | 2b592605ab043be56b5bbbf1ac06f223400dd2ef (patch) | |
tree | 8abe75af453b4726fd858643c92eb160ed113610 /src/entities | |
parent | Merge pull request #113 from erorcun/erorcun (diff) | |
download | re3-2b592605ab043be56b5bbbf1ac06f223400dd2ef.tar re3-2b592605ab043be56b5bbbf1ac06f223400dd2ef.tar.gz re3-2b592605ab043be56b5bbbf1ac06f223400dd2ef.tar.bz2 re3-2b592605ab043be56b5bbbf1ac06f223400dd2ef.tar.lz re3-2b592605ab043be56b5bbbf1ac06f223400dd2ef.tar.xz re3-2b592605ab043be56b5bbbf1ac06f223400dd2ef.tar.zst re3-2b592605ab043be56b5bbbf1ac06f223400dd2ef.zip |
Diffstat (limited to '')
-rw-r--r-- | src/entities/Object.cpp | 22 | ||||
-rw-r--r-- | src/entities/Object.h | 2 |
2 files changed, 24 insertions, 0 deletions
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); |