From ab5e5e03896e052f98dcf34308a32c698b1472f9 Mon Sep 17 00:00:00 2001 From: drfrag666 Date: Thu, 6 Dec 2018 12:00:32 +0100 Subject: [PATCH] - The GetBlend script call is needed in another place as well. # Conflicts: # src/gl/scene/gl_scene.cpp --- src/gl/scene/gl_scene.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/gl/scene/gl_scene.cpp b/src/gl/scene/gl_scene.cpp index 034a508d1..bc3293af5 100644 --- a/src/gl/scene/gl_scene.cpp +++ b/src/gl/scene/gl_scene.cpp @@ -69,6 +69,7 @@ #include "gl/textures/gl_material.h" #include "gl/utility/gl_clock.h" #include "gl/utility/gl_templates.h" +#include "vm.h" //========================================================================== // @@ -776,7 +777,14 @@ void GLSceneDrawer::SetFixedColormap (player_t *player) auto litetype = PClass::FindActor(NAME_PowerLightAmp); for(AInventory * in = cplayer->mo->Inventory; in; in = in->Inventory) { - PalEntry color = in->CallGetBlend (); + PalEntry color = 0; + + IFVIRTUALPTR(in, AInventory, GetBlend) + { + VMValue params[1] = { in }; + VMReturn ret((int*)&color.d); + VMCall(func, params, 1, &ret, 1); + } // Need special handling for light amplifiers if (in->IsKindOf(torchtype))