Skip to content

Commit 44343f8

Browse files
Put a bandaid on Fred freezing
Could be because of variable overflows or from `thistime` somehow being much smaller than `lasttime`. Hard to find the root cause, but manually setting the memory to bad values will no longer cause the freezing with this patch.
1 parent 424c69d commit 44343f8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fred2/fredrender.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,8 @@ void inc_mission_time() {
11251125

11261126
if (Frametime > MAX_FRAMETIME) {
11271127
Frametime = MAX_FRAMETIME;
1128+
} else if (Frametime < 0) {
1129+
Frametime = thistime = MIN_FRAMETIME;
11281130
} else if (Frametime < MIN_FRAMETIME) {
11291131
if (!Cmdline_NoFPSCap) {
11301132
thistime = MIN_FRAMETIME - Frametime;

0 commit comments

Comments
 (0)