Changeset 6135 in orxonox.OLD for branches/objectmanager/src
- Timestamp:
- Dec 16, 2005, 6:01:26 PM (19 years ago)
- Location:
- branches/objectmanager/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/objectmanager/src/lib/collision_detection/cd_engine.cc
r6124 r6135 110 110 { 111 111 BVTree* tree; 112 std::list<WorldEntity*>::iterator entity1, entity2 ;112 std::list<WorldEntity*>::iterator entity1, entity2, pre1, pre2; 113 113 PRINTF(3)("checking for collisions\n"); 114 for (entity1 = list1.begin(); entity1 != list1.end(); entity1++) 114 115 pre1 = list1.begin(); 116 while (pre1 != list1.end()) 115 117 { 118 entity1 = pre1; 119 pre1++; 116 120 if( likely((*entity1) != this->terrain)) 117 121 { 118 for (entity2 = list2.begin(); entity2 != list2.end(); entity2++) 122 pre2 = list2.begin(); 123 while (pre2 != list2.end()) 119 124 { 125 entity2 = pre2; 126 pre2++; 120 127 if( likely((*entity2) != this->terrain)) 121 128 { -
branches/objectmanager/src/story_entities/world.cc
r6134 r6135 690 690 this->gameTime += this->dtS; 691 691 692 this->tick(this->objectManager.getObjectList(OM_DEAD_TICK), this->dtS);692 /* this->tick(this->objectManager.getObjectList(OM_DEAD_TICK), this->dtS); 693 693 this->tick(this->objectManager.getObjectList(OM_COMMON), this->dtS); 694 this->tick(this->objectManager.getObjectList(OM_GROUP_00), this->dtS); 694 this->tick(this->objectManager.getObjectList(OM_GROUP_00), this->dtS);*/ 695 695 this->tick(this->objectManager.getObjectList(OM_GROUP_01), this->dtS); 696 696 this->tick(this->objectManager.getObjectList(OM_GROUP_01_PROJ), this->dtS); 697 698 // tIterator<WorldEntity>* iterator = this->entities->getIterator();699 // WorldEntity* entity = iterator->firstElement();700 // while( entity != NULL)701 // {702 // entity->tick (this->dtS);703 // entity = iterator->nextElement();704 // }705 // delete iterator;706 697 707 698 /* update tick the rest */ … … 747 738 void World::collide() 748 739 { 749 CDEngine::getInstance()->checkCollisions(this->objectManager.getObjectList(OM_GROUP_00), this->objectManager.getObjectList(OM_GROUP_01_PROJ)); 750 CDEngine::getInstance()->checkCollisions(this->objectManager.getObjectList(OM_GROUP_01), this->objectManager.getObjectList(OM_COMMON)); 740 CDEngine::getInstance()->checkCollisions(this->objectManager.getObjectList(OM_GROUP_00), 741 this->objectManager.getObjectList(OM_GROUP_01_PROJ)); 742 CDEngine::getInstance()->checkCollisions(this->objectManager.getObjectList(OM_GROUP_01), 743 this->objectManager.getObjectList(OM_COMMON)); 751 744 } 752 745 -
branches/objectmanager/src/world_entities/npcs/npc.cc
r6134 r6135 50 50 WorldEntity* powerUp = new TurretPowerUp(); 51 51 powerUp->setAbsCoor(this->getAbsCoor()); 52 powerUp->toList(OM_COMMON);52 // powerUp->toList(OM_COMMON); 53 53 } 54 54 else if ((float)rand()/RAND_MAX < .3) -
branches/objectmanager/src/world_entities/space_ships/space_ship.cc
r6130 r6135 112 112 PRINTF(4)("SPACESHIP INIT\n"); 113 113 114 EventHandler::getInstance()->grabEvents( false);114 EventHandler::getInstance()->grabEvents(true); 115 115 116 116 bUp = bDown = bLeft = bRight = bAscend = bDescend = bRollL = bRollR = false; -
branches/objectmanager/src/world_entities/weapons/laser.cc
r6134 r6135 96 96 ParticleEngine::getInstance()->breakConnections(this->emitter); 97 97 this->lifeCycle = 0.0; 98 98 99 this->toList(OM_NULL); 99 100 this->toList(OM_DEAD);101 100 this->removeNode(); 102 101 Laser::fastFactory->kill(this); … … 133 132 this->lifeCycle = .95; //!< @todo calculate this usefully. 134 133 ParticleEngine::getInstance()->addConnection(this->emitter, Laser::explosionParticles); 135 136 134 } 137 135
Note: See TracChangeset
for help on using the changeset viewer.