Skip to content

Commit

Permalink
QMB: Fix single particle after no24bit 1 => 0
Browse files Browse the repository at this point in the history
Fixes #604
Reported by hemostx
  • Loading branch information
meag committed Nov 14, 2021
1 parent bde64c4 commit d37f155
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
12 changes: 4 additions & 8 deletions r_particles_qmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions release-notes-latest.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d37f155

Please sign in to comment.