Changeset 5794 in orxonox.OLD for branches/world_entities/src
- Timestamp:
- Nov 27, 2005, 3:50:20 PM (19 years ago)
- Location:
- branches/world_entities/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/world_entities/src/util/object_manager.cc
r5782 r5794 53 53 * returns a new List with a list of WorldEntities of distance Radius from center 54 54 */ 55 conststd::list<WorldEntity*>* ObjectManager::distanceFromObject(const PNode& center, float radius, ClassID classID)55 std::list<WorldEntity*>* ObjectManager::distanceFromObject(const PNode& center, float radius, ClassID classID) 56 56 { 57 57 const tList<BaseObject>* objectList = ClassList::getList(classID); … … 61 61 62 62 tIterator<BaseObject>* iter = objectList->getIterator(); 63 PNode* tmp = dynamic_cast<PNode*>(iter->firstElement());63 WorldEntity* tmp = dynamic_cast<WorldEntity*>(iter->firstElement()); 64 64 while (tmp != NULL) 65 65 { … … 67 67 newList->push_back(dynamic_cast<WorldEntity*>(tmp)); 68 68 69 tmp = dynamic_cast< PNode*>(iter->nextElement());69 tmp = dynamic_cast<WorldEntity*>(iter->nextElement()); 70 70 } 71 71 delete iter; -
branches/world_entities/src/util/object_manager.h
r5782 r5794 31 31 32 32 33 conststd::list<WorldEntity*>* distanceFromObject(const PNode& center, float radius, ClassID classID);33 static std::list<WorldEntity*>* distanceFromObject(const PNode& center, float radius, ClassID classID); 34 34 35 35 ObjectGroupList* getGroupList( ); -
branches/world_entities/src/world_entities/weapons/ground_turret.cc
r5740 r5794 15 15 16 16 #include "ground_turret.h" 17 #include "factory.h"18 17 #include "model.h" 19 18 #include "turret.h" 19 20 #include "factory.h" 21 #include "load_param.h" 20 22 21 23 CREATE_FACTORY(GroundTurret, CL_GROUND_TURRET); … … 53 55 this->setClassID(CL_GROUND_TURRET, "GroundTurret"); 54 56 this->loadModel("models/ground_turret.obj", 5); 55 left = new Turret(); 57 this->left = NULL; 58 this->right = NULL; 59 60 /* left = new Turret(); 56 61 left->setParent(this); 57 62 left->setRelCoor(0,10,0); 58 63 right = new Turret(); 59 64 right->setParent(this); 60 right->setRelCoor(0,10,0); 65 right->setRelCoor(0,10,0);*/ 61 66 } 62 67 … … 76 81 * @todo: make the class Loadable 77 82 */ 83 LoadParamXML(root, "Weapons", this, GroundTurret, loadWeapon); 78 84 } 79 85 … … 105 111 glMultMatrixf((float*)matrix); 106 112 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 111 120 glPopMatrix(); 112 121 } … … 128 137 void GroundTurret::postSpawn () 129 138 { 130 139 131 140 } 132 141 … … 137 146 void GroundTurret::leftWorld () 138 147 { 139 148 140 149 } -
branches/world_entities/src/world_entities/weapons/ground_turret.h
r5740 r5794 19 19 virtual ~GroundTurret(); 20 20 21 void init(); 21 22 void loadParams(const TiXmlElement* root); 22 void init(); 23 24 void loadWeapons(const TiXmlElement* root); 23 25 24 26 virtual void postSpawn ();
Note: See TracChangeset
for help on using the changeset viewer.