port: simplify night vision check for prop flickering fix

This commit is contained in:
fgsfds committed 2024-11-22 10:40:20 +01:00
1 parent 3cadaecf96
commit b97eaa9e12
1 file changed
+5 -8
+5 -8
View File
@@ -1615,19 +1615,16 @@ void propCalculateShadeColour(struct prop *prop, u8 *nextcol, u16 floorcol)
#endif
{
s32 shade = func0f068fc8(prop, 0);
if (USINGDEVICE(DEVICE_NIGHTVISION)) {
switch (prop->type) {
case PROPTYPE_PLAYER:
if (g_Vars.currentplayer->prop == prop) {
break;
}
default:
// fix props flickering in split screen when one of the players has night vision on
if (prop->type != PROPTYPE_PLAYER || g_Vars.currentplayer->prop != prop) {
if (USINGDEVICE(DEVICE_NIGHTVISION)) {
if (prop->rooms[0] >= 0) {
shade = g_Rooms[prop->rooms[0]].br_settled_regional;
}
break;
}
}
roomr = shade;
roomg = shade;
roomb = shade;