light level on player

Expanding and utilizing the engine via C++.
2 posts Page 1 of 1
Posts: 104
Joined: Fri Dec 29, 2017 4:34 pm
by Hodo33 » Sun Jul 22, 2018 11:04 pm
Back in 1.5.2 when opengl was used I added this

In at the end I added
ColorF SceneObject::getLastColor(void)
return mLightingInfo.smAmbientLight.mColor;

ConsoleMethod( Player, getColor, const char*, 2, 2, "Return the current color level.")
char *buff = Con::getReturnBuffer(128);
ColorF color = object->getLastColor();
dSprintf(buff,128, "%f %f %f %f",,,, color.alpha);
return buff;

I could use this to get the intensity of light on my character so I could code if the bots could see me lurking in the night shadows.

Now using 3.8 things have changed and I would like to find where I could get the player current light intensity. Can anyone point me to where I could get this info now? I understand it has to do with rendering the color of a texture on the player but after much searching I am lost...
Any help ? This should be part of the engine if it is not already....
Posts: 104
Joined: Sat Apr 11, 2015 9:08 pm
by Happenstance » Tue Jul 24, 2018 8:12 pm
2 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests