Changeset 2644 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Oct 25, 2004, 4:26:40 PM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/error.h
r2636 r2644 24 24 // this are the two undefined error nr. Don't use them ... 25 25 #define ERROR -1 26 #define N O_ERROR 026 #define NERROR 0 27 27 28 28 /*! -
orxonox/trunk/src/world.cc
r2640 r2644 51 51 { 52 52 Orxonox *orx = Orxonox::getInstance(); 53 orx->get_localinput()->unbind (localPlayer); 54 delete entities; 53 orx->get_localinput()->unbind (this->localPlayer); 54 delete this->entities; 55 delete this->localCamera; 55 56 } 56 57 … … 112 113 113 114 // create a player 114 WorldEntity* myPlayer = (WorldEntity*) this->spawn<Player>(); 115 //WorldEntity* myPlayer = (WorldEntity*) this->spawn<Player>(); 116 WorldEntity* myPlayer = new Player(); 117 this->spawn(myPlayer); 115 118 this->localPlayer = myPlayer; 116 119 … … 144 147 145 148 // create a player 146 WorldEntity* myPlayer = (WorldEntity*) this->spawn<Player>(); 149 //WorldEntity* myPlayer = (WorldEntity*) this->spawn<Player>(); 150 WorldEntity* myPlayer = new Player(); 151 this->spawn(myPlayer); 147 152 this->localPlayer = myPlayer; 148 153 … … 527 532 return this->localCamera; 528 533 } 534 535 536 void World::spawn(WorldEntity* entity) 537 { 538 Location zeroloc; 539 Location* loc = NULL; 540 WorldEntity* owner; 541 //T* entity = new T(); 542 entities->add (entity, LIST_ADD_NEXT); 543 //if( loc == NULL) 544 //{ 545 zeroloc.dist = 0; 546 zeroloc.part = 0; 547 zeroloc.pos = Vector(); 548 zeroloc.rot = Quaternion(); 549 loc = &zeroloc; 550 //} 551 entity->init (loc, owner); 552 if (entity->bFree) 553 { 554 this->track[loc->part].map_coords( loc, entity->get_placement()); 555 } 556 entity->post_spawn (); 557 //return entity; 558 } -
orxonox/trunk/src/world.h
r2640 r2644 50 50 Camera* getCamera(); 51 51 //private: 52 52 53 void spawn(WorldEntity* entity); 54 53 55 List<WorldEntity>* entities; 54 56
Note: See TracChangeset
for help on using the changeset viewer.