From d37f155387cbbe5311943dc35399393746f76ada Mon Sep 17 00:00:00 2001 From: meag Date: Sun, 14 Nov 2021 11:28:15 +0000 Subject: [PATCH] QMB: Fix single particle after no24bit 1 => 0 Fixes #604 Reported by hemostx --- r_particles_qmb.c | 12 ++++-------- release-notes-latest.md | 1 + release-notes.md | 1 + 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/r_particles_qmb.c b/r_particles_qmb.c index 7d437dd9c..ec41b341f 100644 --- a/r_particles_qmb.c +++ b/r_particles_qmb.c @@ -348,10 +348,9 @@ void QMB_InitParticles(void) Q_free(particles); // yeah, shit happens, work around QMB_AllocParticles(); } - else { - QMB_ClearParticles (); // also re-allocc particles - qmb_initialized = false; // so QMB particle system will be turned off if we fail to load some texture - } + + QMB_ClearParticles(); // re-alloc particles, and create linked list of next free particle + qmb_initialized = false; // so QMB particle system will be turned off if we fail to load some texture ADD_PARTICLE_TEXTURE(ptex_none, null_texture_reference, 0, 1, 0, 0, 0, 0); @@ -477,10 +476,7 @@ void QMB_ClearParticles (void) { int i; - if (!qmb_initialized) { - return; - } - + // FIXME: if r_numparticles hasn't changed, then no-need to reallocate again. Q_free(particles); // free QMB_AllocParticles(); // and alloc again diff --git a/release-notes-latest.md b/release-notes-latest.md index 653105757..d9c19ee06 100644 --- a/release-notes-latest.md +++ b/release-notes-latest.md @@ -5,6 +5,7 @@ Leaving these here as bugs between dev versions of 3.6 aren't in the release not - Added `/vid_reload` command to reload textures, rather than full `/vid_restart`. `/vid_reload_auto` cvar controls automatic/manual. - Fixed `/gl_no24bit` not affecting aliasmodel skins (3.5 bug, reported by hemostx, #605) - `/gl_consolefont` now falls back to 'original' on load failure, but doesn't change value (for toggling no24bit, #605) +- Fixed toggling `/gl_no24bit` 1 => 0 causing maximum of a single QMB particle (old bug, reported by hemostx, #604) ### Changes from alpha8=>alpha9 (July 13th => November 14th, 2021) diff --git a/release-notes.md b/release-notes.md index 5c3b8605a..9112fd756 100644 --- a/release-notes.md +++ b/release-notes.md @@ -38,6 +38,7 @@ - Fixed bug causing client to receive playerinfo packet before knowing which protocol extensions are enabled when using `/cl_delay_packet` on local server (#488, reported by pattah) - Fixed bug causing fps to affect `/cl_yawspeed`/`+left`/`+right` commands (keyboard turning) (old bug, #550, reported by veganaize) - Fixed bug causing missing entities when playing back demos recorded in FTE (old bug, #551, reported by lordee) +- Fixed bug causing toggling `/gl_no24bit` 1 => 0 causing maximum of a single QMB particle (old bug, #604, reported by hemostx) - Translucent models are first drawn with a z-pass, to stop overdraw affecting level of translucency ### Bugs which affected 3.x