Skip to content

Commit d6d3866

Browse files
committed
Whoops
1 parent a0ac74b commit d6d3866

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Source/Entities/AEmitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ float AEmitter::EstimateImpulse(bool burst) {
297297
float spread = (std::max(static_cast<float>(c_PI) - (emission->GetSpread() * scale), 0.0F) / c_PI); // A large spread will cause the forces to cancel eachother out
298298

299299
// Add to accumulative recoil impulse generated, F = m * a.
300-
impulse += (velMin + velRange) * spread * emission->m_pEmission->GetMass() * emissions;
300+
impulse += (velMin + velRange) * spread * emission->m_pEmission->GetMass() * emissionsPerFrame;
301301
}
302302
}
303303

Source/Entities/PEmitter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ float PEmitter::EstimateImpulse(bool burst) {
253253
float spread = (std::max(static_cast<float>(c_PI) - (emission->GetSpread() * scale), 0.0F) / c_PI); // A large spread will cause the forces to cancel eachother out
254254

255255
// Add to accumulative recoil impulse generated, F = m * a.
256-
impulse += (velMin + velRange) * spread * emission->m_pEmission->GetMass() * emissions;
256+
impulse += (velMin + velRange) * spread * emission->m_pEmission->GetMass() * emissionsPerFrame;
257257
}
258258
}
259259

@@ -346,7 +346,7 @@ void PEmitter::Update() {
346346
// Now figure how many full emissions can fit in the current accumulator
347347
emissionCount = std::floor(emission->m_Accumulator / SPE);
348348
// Deduct the about to be emitted emissions from the accumulator
349-
emission->m_Accumulator -= emissions * SPE;
349+
emission->m_Accumulator -= emissionCount * SPE;
350350

351351
RTEAssert(emission->m_Accumulator >= 0, "Emission accumulator negative!");
352352
}

0 commit comments

Comments
 (0)