Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 7, 2005, 3:54:49 PM (20 years ago)
Author:
chris
Message:

orxonox/branches/levelloader: Merged trunk into branch… still not working though…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/levelloader/src/track_manager.cc

    r3605 r3746  
    1818#include "track_manager.h"
    1919
     20#include "base_object.h"
    2021#include "p_node.h"
    2122#include "substring.h"
    2223
    2324#include "track_node.h"
     25#include "stdincl.h"
     26#include "list.h"
     27#include "debug.h"
     28
     29
    2430
    2531#include <stdarg.h>
     
    6773  if ((!this->isJoined &&this->childCount > 0) || (this->isJoined && this->mainJoin))
    6874    {
    69       TrackElement* enumElem = children->enumerate();
     75      tIterator<TrackElement>* iterator = this->children->getIterator();
     76      TrackElement* enumElem = iterator->nextElement();
    7077      while (enumElem)
    7178        {
    7279          delete enumElem;
    73           enumElem = children->nextElement();
    74         }
     80          enumElem = iterator->nextElement();
     81        }
     82      delete iterator;
    7583      delete this->children;
    7684    }
     
    92100  if (this->childCount > 0)
    93101    {
    94       TrackElement* enumElem = this->children->enumerate();
     102      tIterator<TrackElement>* iterator = this->children->getIterator();
     103      TrackElement* enumElem = iterator->nextElement();
    95104      TrackElement* tmpElem;
    96105      while (enumElem)
     
    98107          if ((tmpElem = enumElem->findByID(trackID)))
    99108            return tmpElem;
    100           enumElem = this->children->nextElement();
    101         }
     109          enumElem = iterator->nextElement();
     110        }
     111      delete iterator;
    102112    }
    103113  else
     
    145155  else
    146156    {
    147       TrackElement* enumElem = this->children->enumerate();
     157      tIterator<TrackElement>* iterator = this->children->getIterator();
     158      TrackElement* enumElem = iterator->nextElement();
    148159      while (enumElem)
    149160        {
    150161          if(!enumElem->backLoopCheck(trackElem))
    151162            return false;
    152           enumElem = this->children->nextElement();
    153         }
     163          enumElem = iterator->nextElement();
     164        }
     165      delete iterator;
    154166     
    155167      return true;
     
    287299  PNode* tmpNode = (PNode*)node;
    288300
    289   if (tmpNode->getRelCoor().z < 0)
     301  if (tmpNode->getRelCoor()->z < 0)
    290302    return 0;
    291303  else
     
    308320  PNode* tmpNode = (PNode*)node;
    309321
    310   Vector nodeRelCoord = tmpNode->getRelCoor();
     322  Vector nodeRelCoord = *tmpNode->getRelCoor();
    311323  float minDist = 100000000;
    312324  int childNumber = 0;
     
    910922void TrackManager::drawGraph(float dt) const
    911923{
    912 
    913924  for (int i = 1; i <= trackElemCount; i++)
    914925    {
     
    922933            glVertex3f(tmpVector.x, tmpVector.y, tmpVector.z);
    923934          }
    924   glEnd();
     935      glEnd();
    925936    }
    926937}
Note: See TracChangeset for help on using the changeset viewer.