ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.66k stars 616 forks source link

[Op4] NightVision Goggle Illumination glitch and HL Log #1858

Open APGRoboCop opened 6 years ago

APGRoboCop commented 6 years ago

Hello myself and some of my clan members noticed when we played on Op4CTF that our NightVision goggles makes our surroundings brighten up. You cannot detect them when playing in 1st Person Mode but you can detect your enemy or team mate's surroundings being lit up around it when using NV Goggles. I'm not sure if this is affected in Op4DM mode for those op4_* maps, but it seems like Op4 got a few bugs to pick up: like the Long Jump Rune for CTF, Scoreboard too thin to read long nicknames and hostname.

https://github.com/ValveSoftware/halflife/issues/1279

https://github.com/ValveSoftware/halflife/issues/1857

I'm not sure if there is a HL log problem or that but it appears my gameME and HLStatsX doesn't allow me to take the kills, deaths nor hits properly relayed to my Stats Web Page for some reason, unless I need to download a plugin for the HL Log to work. I'm not sure if AMXX Lamdba Stats is supposed to fix this problem, but it I am not sure... I did try LogMod from HLSW but I know that their latest version crashes a lot except on v0.8.0.0 and that didn't seem to resolve this issue.

SamVanheer commented 3 years ago

The NVG illumination can be filtered out here: https://github.com/ValveSoftware/halflife/blob/c7240b965743a53a29491dd49320c88eecf6257b/dlls/client.cpp#L1190-L1192

By adding this code:

//Remove the night vision illumination effect so other players don't see it
if (player && host != ent)
{
    state->effects &= ~EF_BRIGHTLIGHT;
}

This removes the flag from players that are not the player to whom the update is being sent.