Skip to content

Commit

Permalink
Merge pull request #525 from cylonicboom/fix-mp-nvg
Browse files Browse the repository at this point in the history
Fixes MP NVG flashing bug
  • Loading branch information
fgsfdsfgs authored Nov 22, 2024
2 parents 4bc1a16 + 8fe95d7 commit 3cadaec
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/game/propobj.c
Original file line number Diff line number Diff line change
Expand Up @@ -1615,7 +1615,19 @@ 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:
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 3cadaec

Please sign in to comment.