1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-01-24 17:26:41 +00:00

Fix influenced particles not positioned correctly if SpawnLocal = 1

This commit is contained in:
fgenesis 2012-12-13 18:33:58 +01:00
parent c5700f9c35
commit 1705b091aa

View file

@ -155,6 +155,9 @@ void ParticleManager::updateParticle(Particle *p, float dt)
if (suckPos) if (suckPos)
{ {
Vector dir = (*suckPos) - p->emitter->getWorldCollidePosition(p->pos); Vector dir = (*suckPos) - p->emitter->getWorldCollidePosition(p->pos);
//HACK: what? ->
if (!p->emitter->data.spawnLocal && p->emitter->getParent())
dir += p->emitter->getParent()->position;
dir.setLength2D(p->emitter->data.suckStr); dir.setLength2D(p->emitter->data.suckStr);
p->vel += dir * dt; p->vel += dir * dt;
} }