Skip to content

Commit 2cb95bc

Browse files
committed
fix math
1 parent aaa44be commit 2cb95bc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

code/weapon/weapons.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,10 +700,10 @@ static particle::ParticleEffectHandle convertLegacyPspewBuffer(const pspew_legac
700700
auto vel_vol_temp = std::make_unique<particle::PointVolume>();
701701
vel_vol_temp->posOffset = vec3d {{{pspew_buffer.particle_spew_scale, 0.f, 0.f}}};
702702
float rot_rnd_min = 0.f;
703-
float rot_rnd_max = pspew_buffer.particle_spew_rotation_rate;
703+
float rot_rnd_max = 1.0f / pspew_buffer.particle_spew_rotation_rate;
704704
if (rot_rnd_max < rot_rnd_min)
705705
std::swap(rot_rnd_min, rot_rnd_max);
706-
vel_vol_temp->m_modular_curves.add_curve("Time Running", particle::PointVolume::VolumeModularCurveOutput::OFFSET_ROT, modular_curves_entry{curve_id, ::util::UniformFloatRange(1.f), ::util::UniformFloatRange(rot_rnd_min, 1.f / rot_rnd_max), true});
706+
vel_vol_temp->m_modular_curves.add_curve("Time Running", particle::PointVolume::VolumeModularCurveOutput::OFFSET_ROT, modular_curves_entry{curve_id, ::util::UniformFloatRange(1.f), ::util::UniformFloatRange(rot_rnd_min, rot_rnd_max), true});
707707
velocity_vol = std::move(vel_vol_temp);
708708
}
709709
break;

0 commit comments

Comments
 (0)