Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5794 in orxonox.OLD for branches/world_entities/src


Ignore:
Timestamp:
Nov 27, 2005, 3:50:20 PM (19 years ago)
Author:
bensch
Message:

we: sync

Location:
branches/world_entities/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/world_entities/src/util/object_manager.cc

    r5782 r5794  
    5353 * returns a new List with a list of WorldEntities of distance Radius from center
    5454 */
    55 const std::list<WorldEntity*>* ObjectManager::distanceFromObject(const PNode& center, float radius, ClassID classID)
     55std::list<WorldEntity*>* ObjectManager::distanceFromObject(const PNode& center, float radius, ClassID classID)
    5656{
    5757  const tList<BaseObject>* objectList = ClassList::getList(classID);
     
    6161
    6262    tIterator<BaseObject>* iter = objectList->getIterator();
    63     PNode* tmp = dynamic_cast<PNode*>(iter->firstElement());
     63    WorldEntity* tmp = dynamic_cast<WorldEntity*>(iter->firstElement());
    6464    while (tmp != NULL)
    6565    {
     
    6767        newList->push_back(dynamic_cast<WorldEntity*>(tmp));
    6868
    69       tmp = dynamic_cast<PNode*>(iter->nextElement());
     69      tmp = dynamic_cast<WorldEntity*>(iter->nextElement());
    7070    }
    7171    delete iter;
  • branches/world_entities/src/util/object_manager.h

    r5782 r5794  
    3131
    3232
    33   const std::list<WorldEntity*>* distanceFromObject(const PNode& center, float radius, ClassID classID);
     33  static std::list<WorldEntity*>* distanceFromObject(const PNode& center, float radius, ClassID classID);
    3434
    3535  ObjectGroupList* getGroupList( );
  • branches/world_entities/src/world_entities/weapons/ground_turret.cc

    r5740 r5794  
    1515
    1616#include "ground_turret.h"
    17 #include "factory.h"
    1817#include "model.h"
    1918#include "turret.h"
     19
     20#include "factory.h"
     21#include "load_param.h"
    2022
    2123CREATE_FACTORY(GroundTurret, CL_GROUND_TURRET);
     
    5355  this->setClassID(CL_GROUND_TURRET, "GroundTurret");
    5456  this->loadModel("models/ground_turret.obj", 5);
    55   left = new Turret();
     57  this->left = NULL;
     58  this->right = NULL;
     59
     60  /*  left = new Turret();
    5661  left->setParent(this);
    5762  left->setRelCoor(0,10,0);
    5863  right = new Turret();
    5964  right->setParent(this);
    60   right->setRelCoor(0,10,0);
     65  right->setRelCoor(0,10,0);*/
    6166}
    6267
     
    7681   * @todo: make the class Loadable
    7782   */
     83  LoadParamXML(root, "Weapons", this, GroundTurret, loadWeapon);
    7884}
    7985
     
    105111  glMultMatrixf((float*)matrix);
    106112
    107   if (model)
    108     model->draw();
    109   //left->draw();
    110   //right->draw();
     113  if (this->model)
     114    this->model->draw();
     115  if (left != NULL)
     116    this->left->draw();
     117  if (this->right != NULL)
     118    this->right->draw();
     119
    111120  glPopMatrix();
    112121}
     
    128137void GroundTurret::postSpawn ()
    129138{
    130    
     139
    131140}
    132141
     
    137146void GroundTurret::leftWorld ()
    138147{
    139    
     148
    140149}
  • branches/world_entities/src/world_entities/weapons/ground_turret.h

    r5740 r5794  
    1919  virtual ~GroundTurret();
    2020
     21  void init();
    2122  void loadParams(const TiXmlElement* root);
    22   void init();
     23
     24  void loadWeapons(const TiXmlElement* root);
    2325
    2426  virtual void postSpawn ();
Note: See TracChangeset for help on using the changeset viewer.