Skip to content

Commit

Permalink
port: simplify night vision check for prop flickering fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fgsfdsfgs committed Nov 22, 2024
1 parent 3cadaec commit b97eaa9
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/game/propobj.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b97eaa9

Please sign in to comment.