Skip to content

Commit 58ff297

Browse files
authored
Update to #7023 (#7042)
From Sept 15 onward in fast debug I hit this error when using weapon create ASSERTION: "cur_frame < part->nframes" at particle.cpp:371 Assert: "cur_frame < part->nframes" File: particle.cpp Line: 371 Thanks to lafiel, `that assert should have an `|| (part->nframes == 0 && cur_frame == 0) appended beaause while we need to stay inbounds for animations, frame 0 for both is valid for static images`
1 parent 7875e5f commit 58ff297

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

code/particle/particle.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ namespace particle
368368

369369
framenum = part->bitmap;
370370

371-
Assert( cur_frame < part->nframes );
371+
Assert( (cur_frame < part->nframes) || (part->nframes == 0 && cur_frame == 0) );
372372

373373
float radius = part->radius * source_effect.m_lifetime_curves.get_output(ParticleEffect::ParticleLifetimeCurvesOutput::VELOCITY_MULT, curve_input);
374374

0 commit comments

Comments
 (0)