Skip to content

Commit 973bd55

Browse files
authored
Small particle copy-paste fixes (#7044)
* Use correct curve * Properly init animation data
1 parent 1544540 commit 973bd55

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

code/particle/ParticleEffect.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,8 @@ auto ParticleEffect::processSourceInternal(float interp, const ParticleSource& s
337337
info.length = m_length.next() * lengthMultiplier;
338338

339339
int fps = 1;
340-
if (info.nframes < 0) {
341-
Assertion(bm_is_valid(info.bitmap), "Invalid bitmap handle passed to particle create.");
342-
bm_get_info(info.bitmap, nullptr, nullptr, nullptr, &info.nframes, &fps);
343-
}
340+
Assertion(bm_is_valid(info.bitmap), "Invalid bitmap handle passed to particle create.");
341+
bm_get_info(info.bitmap, nullptr, nullptr, nullptr, &info.nframes, &fps);
344342

345343
if (m_hasLifetime) {
346344
if (m_keep_anim_length_if_available && info.nframes > 1) {

code/particle/particle.cpp

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

445445
Assert( (cur_frame < part->nframes) || (part->nframes == 0 && cur_frame == 0) );
446446

447-
float radius = part->radius * source_effect.m_lifetime_curves.get_output(ParticleEffect::ParticleLifetimeCurvesOutput::VELOCITY_MULT, curve_input);
447+
float radius = part->radius * source_effect.m_lifetime_curves.get_output(ParticleEffect::ParticleLifetimeCurvesOutput::RADIUS_MULT, curve_input);
448448

449449
if (part->length != 0.0f) {
450450
vec3d p0 = p_pos;

0 commit comments

Comments
 (0)