summaryrefslogtreecommitdiffstats
path: root/src/entities
diff options
context:
space:
mode:
Diffstat (limited to 'src/entities')
-rw-r--r--src/entities/Object.cpp22
-rw-r--r--src/entities/Object.h2
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);