mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-23 15:52:41 +02:00
port: simplify night vision check for prop flickering fix
This commit is contained in:
1 parent
3cadaecf96
commit
b97eaa9e12
1 file changed
+5
-8
+5
-8
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user