Closed haekb closed 4 years ago
This happens on release builds :(
A week later...I cannot reproduce this. Did the latest windows 10 update fix this?
Ahah, it's caused by music.
So here's the situation:
Each mood (None, Routine, Alert, Combat) individually builds up a timer that caps out at 10 seconds.
Each time a MusicMgr::DoMood
function is called it increments the frametime to that timer.
Each time MusicMgr::Update
function is called it decrements the frametime to that timer.
If a timer reaches zero it transitions to another mood with a timer of > 0. (I haven't really looked into whether it transitions up or just picks the next timer with > 0.)
For some reason on framerates higher than 100fps it either decrements more than it increments, or vice versa, causing the timer to reach 0 for more than 1 frame causing a rapid music transitions.
This might have something to do with NOLF 1 and their server framerate being capped 100. But I need to do some more digging!
Noticed some weird frame timings when an npc is on alert. Could just be some debug logging, since this is in debug mode.
Good to keep an eye on though.