From 2612b6e251d7c8ec501f5b9b34ec5258dbf4c078 Mon Sep 17 00:00:00 2001 From: fgenesis Date: Wed, 28 Jan 2015 01:45:52 +0100 Subject: [PATCH] tiny cleanup --- Aquaria/Game.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Aquaria/Game.cpp b/Aquaria/Game.cpp index 5d19ac5..1b35de4 100644 --- a/Aquaria/Game.cpp +++ b/Aquaria/Game.cpp @@ -5910,22 +5910,14 @@ void Game::rebuildElementUpdateList() elementUpdateList.clear(); elementInteractionList.clear(); for (int i = 0; i < dsq->getNumElements(); i++) - //for (int i = LR_ELEMENTS1; i <= LR_ELEMENTS8; i++) { - //RenderObjectLayer *rl = dsq->getRenderObjectLayer(i); Element *e = dsq->getElement(i); - if (e && e->layer >= LR_ELEMENTS1 && e->layer <= LR_ELEMENTS8) - { - if (e->getElementEffectIndex() != -1) - { - elementUpdateList.push_back(e); - } - } - ElementEffect ee = dsq->getElementEffectByIndex(e->getElementEffectIndex()); + const int eeidx = e->getElementEffectIndex(); + if (eeidx != -1 && e->layer >= LR_ELEMENTS1 && e->layer <= LR_ELEMENTS8) + elementUpdateList.push_back(e); + ElementEffect ee = dsq->getElementEffectByIndex(eeidx); if(ee.type == EFX_WAVY) - { elementInteractionList.push_back(e); - } } }