summaryrefslogtreecommitdiffstats
path: root/src/render/Renderer.cpp
diff options
context:
space:
mode:
authorFire_Head <Fire-Head@users.noreply.github.com>2019-06-13 02:47:13 +0200
committerGitHub <noreply@github.com>2019-06-13 02:47:13 +0200
commit9689def6a59bd8a1d05860c7d23f1837cf3b4a80 (patch)
treecbd5cdfcb16bb993ca4b75552a48eab641541b77 /src/render/Renderer.cpp
parentUpdate Replay.h (diff)
parentsilly mistake (diff)
downloadre3-9689def6a59bd8a1d05860c7d23f1837cf3b4a80.tar
re3-9689def6a59bd8a1d05860c7d23f1837cf3b4a80.tar.gz
re3-9689def6a59bd8a1d05860c7d23f1837cf3b4a80.tar.bz2
re3-9689def6a59bd8a1d05860c7d23f1837cf3b4a80.tar.lz
re3-9689def6a59bd8a1d05860c7d23f1837cf3b4a80.tar.xz
re3-9689def6a59bd8a1d05860c7d23f1837cf3b4a80.tar.zst
re3-9689def6a59bd8a1d05860c7d23f1837cf3b4a80.zip
Diffstat (limited to 'src/render/Renderer.cpp')
-rw-r--r--src/render/Renderer.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index c2b341dc..5a27ab32 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -16,6 +16,7 @@
#include "ModelIndices.h"
#include "Streaming.h"
#include "Shadows.h"
+#include "PointLights.h"
#include "Renderer.h"
bool gbShowPedRoadGroups;
@@ -1153,6 +1154,16 @@ CRenderer::IsVehicleCullZoneVisible(CEntity *ent)
return true;
}
+void
+CRenderer::RemoveVehiclePedLights(CEntity *ent, bool reset)
+{
+ if(ent->bRenderScorched)
+ WorldReplaceScorchedLightsWithNormal(Scene.world);
+ CPointLights::RemoveLightsAffectingObject();
+ if(reset)
+ ReSetAmbientAndDirectionalColours();
+}
+
STARTPATCHES
InjectHook(0x4A7680, CRenderer::Init, PATCH_JUMP);
@@ -1185,4 +1196,6 @@ STARTPATCHES
InjectHook(0x4A9840, CRenderer::ShouldModelBeStreamed, PATCH_JUMP);
InjectHook(0x4AAA00, CRenderer::IsEntityCullZoneVisible, PATCH_JUMP);
InjectHook(0x4AAAA0, CRenderer::IsVehicleCullZoneVisible, PATCH_JUMP);
+
+ InjectHook(0x4A7CF0, CRenderer::RemoveVehiclePedLights, PATCH_JUMP);
ENDPATCHES