mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-07 03:17:22 -04:00
Re-enable JParticle interpolation and fix emitter direction issue (#1968)
* Re-enable JParticle interpolation * Ensure emitter direction is valid for JPA interp Fixes #618. * Don't `calcWorkData` if we don't need to
This commit is contained in:
@@ -206,8 +206,7 @@ void JPABaseParticle::init_c(JPAEmitterWorkData* work, JPABaseParticle* parent)
|
||||
|
||||
#if TARGET_PC
|
||||
void JPABaseParticle::interp(JPAEmitterWorkData* work, void const* drawFunc) {
|
||||
static bool enable = false;
|
||||
if (!enable)
|
||||
if (!dusk::frame_interp::is_enabled())
|
||||
return;
|
||||
|
||||
// don't interpolate the first frame
|
||||
|
||||
@@ -761,6 +761,15 @@ bool JPAResource::calc(JPAEmitterWorkData* work, JPABaseEmitter* emtr) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef TARGET_PC
|
||||
if (((pBsp && pBsp->getDirType() == 3) || (pCsp && pCsp->getDirType() == 3)) &&
|
||||
dusk::frame_interp::is_enabled())
|
||||
{
|
||||
// ensure mGlobalEmtrDir is valid
|
||||
calcWorkData_d(work);
|
||||
}
|
||||
#endif
|
||||
|
||||
JPANode<JPABaseParticle>* next = NULL;
|
||||
for (JPANode<JPABaseParticle>* node = emtr->mAlivePtclBase.getFirst(); node != emtr->mAlivePtclBase.getEnd(); node = next) {
|
||||
next = node->getNext();
|
||||
|
||||
Reference in New Issue
Block a user