From d46558fff49d6444bd2479a998ac006d5361ec82 Mon Sep 17 00:00:00 2001 From: rforder Date: Wed, 5 Aug 2009 02:03:47 +0000 Subject: [PATCH] Moved m_animated_textures.clear(), m_all_nodes.clear(), & m_all_meshes.clear() *outside* of the respective for loops & removed the redundant null pointer check for m_animated textures per Joerg's observations. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3810 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/tracks/track.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/tracks/track.cpp b/src/tracks/track.cpp index b36a35c5c..807cefb2b 100644 --- a/src/tracks/track.cpp +++ b/src/tracks/track.cpp @@ -111,18 +111,20 @@ void Track::cleanup() for(unsigned int i=0; iremoveNode(m_all_nodes[i]); - m_all_nodes.clear(); } + m_all_nodes.clear(); + for(unsigned int i=0; iremoveMesh(m_all_meshes[i]); - m_all_meshes.clear(); } + m_all_meshes.clear(); delete m_non_collision_mesh; @@ -512,8 +514,7 @@ void Track::update(float dt) { for(unsigned int i=0; iupdate(dt); + m_animated_textures[i]->update(dt); } for(unsigned int i=0; i