diff --git a/Aquaria/Avatar.cpp b/Aquaria/Avatar.cpp index 43d334c..6642d42 100644 --- a/Aquaria/Avatar.cpp +++ b/Aquaria/Avatar.cpp @@ -7127,7 +7127,7 @@ void Avatar::onUpdate(float dt) if(!core->particlesPaused && elementEffectMult > 0) { - ElementUpdateList& elems = dsq->game->elementUpdateList; + ElementUpdateList& elems = dsq->game->elementInteractionList; for (ElementUpdateList::iterator it = elems.begin(); it != elems.end(); ++it) { (*it)->doInteraction(this, elementEffectMult, 16); diff --git a/Aquaria/Element.cpp b/Aquaria/Element.cpp index 9c8cc51..c18bac7 100644 --- a/Aquaria/Element.cpp +++ b/Aquaria/Element.cpp @@ -84,12 +84,8 @@ void Element::doInteraction(Entity *ent, float mult, float touchWidth) eff->hitPerc = hitPerc; eff->touchVel = ent->vel; eff->effectMult = mult; - return; } } - //eff->touchVel = Vector(0, 0); - //eff->hitPerc = 0; - eff->touching = false; } void Element::updateEffects(float dt) @@ -110,6 +106,7 @@ void Element::updateEffects(float dt) if (eff->touching) { + eff->touching = false; float ramp = eff->touchVel.getLength2D()/800.0f; if (ramp < 0) ramp = 0; if (ramp > 1) ramp = 1; diff --git a/Aquaria/Game.cpp b/Aquaria/Game.cpp index f9e1c85..00e92e3 100644 --- a/Aquaria/Game.cpp +++ b/Aquaria/Game.cpp @@ -10824,6 +10824,7 @@ void Game::removeState() core->particlesPaused = false; elementUpdateList.clear(); + elementInteractionList.clear(); dsq->setCursor(CURSOR_NORMAL); dsq->darkLayer.toggle(0); diff --git a/Aquaria/ScriptInterface.cpp b/Aquaria/ScriptInterface.cpp index 6eaa708..4d6a5fa 100644 --- a/Aquaria/ScriptInterface.cpp +++ b/Aquaria/ScriptInterface.cpp @@ -5525,7 +5525,7 @@ luaFunc(entity_doElementInteraction) if (!touchWidth) touchWidth = 16; - ElementUpdateList& elems = dsq->game->elementUpdateList; + ElementUpdateList& elems = dsq->game->elementInteractionList; for (ElementUpdateList::iterator it = elems.begin(); it != elems.end(); ++it) { (*it)->doInteraction(e, mult, touchWidth);