Skip to content

Commit 6ff5de4

Browse files
author
newby
committed
Move suspect string uop behind debug control
1 parent 76a7eec commit 6ff5de4

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

csqc/events.qc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,15 @@ string cached_timer;
310310
string GetGrenTimerSound() {
311311
string wav = CVARS(FOCMD_GRENTIMERSOUND);
312312

313-
if (cached_timer != wav) {
314-
precache_sound(wav);
315-
cached_timer = wav;
313+
// The string NE-uop below is suspect in crashes. Possible interaction
314+
// with cvar_string implementation. Hopefully the migration to autocvar
315+
// resolves this, but also put it behind a debug control temporarily so we
316+
// can test with/without.
317+
if (CVARF(fo_grentimer_debug) & 8 == 1) {
318+
if (cached_timer != wav) {
319+
precache_sound(wav);
320+
cached_timer = wav;
321+
}
316322
}
317323
return wav;
318324
}

0 commit comments

Comments
 (0)