Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4558 in orxonox.OLD for orxonox/trunk/src/story_entities


Ignore:
Timestamp:
Jun 8, 2005, 9:02:12 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: PhysicsEngine looks better (it speeds up things… but i do not exactly know if it works

Location:
orxonox/trunk/src/story_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/story_entities/world.cc

    r4555 r4558  
    214214  this->debugWorldNr = worldID;
    215215  this->entities = new tList<WorldEntity>();
     216  this->cycle = 0;
    216217}
    217218
     
    498499  Field* gravity = new Gravity();
    499500  gravity->setMagnitude(10.0);
    500   //  gravity->setParent(this->localCamera->getTarget());
     501  gravity->setParent(this->localCamera->getTarget());
    501502
    502503  // Add the Flow from the Emitter into the System
     
    958959  while( !this->bQuitOrxonox && !this->bQuitCurrentGame) /* \todo implement pause */
    959960    {
     961      ++this->cycle;
    960962      PRINTF(3)("World::mainloop() - number of entities: %i\n", this->entities->getSize());
    961963      // Network
     
    10581060      this->trackManager->tick(this->dt);
    10591061      this->localCamera->tick(this->dt);
     1062      // tick the engines
    10601063      AnimationPlayer::getInstance()->tick(this->dtS);
    1061       PhysicsEngine::getInstance()->tick(this->dtS);
    1062 
    1063 
    1064       particleEngine->tick(this->dtS);
    1065       this->garbageCollector->tick(this->dtS);
    1066 
    1067       /* actualy the Graphics Engine should tick the world not the other way around...
     1064      if (this->cycle > 5)
     1065        PhysicsEngine::getInstance()->tick(this->dtS);
     1066
     1067      ParticleEngine::getInstance()->tick(this->dtS);
     1068      GarbageCollector::getInstance()->tick(this->dtS);
     1069
     1070      /** actualy the Graphics Engine should tick the world not the other way around...
    10681071         but since we like the things not too complicated we got it this way around
    10691072         until there is need or time to do it the other way around.
  • orxonox/trunk/src/story_entities/world.h

    r4409 r4558  
    1 /*! 
     1/*!
    22    \file world.h
    33    \brief Holds and manages all game data
    4 */ 
     4*/
    55
    66#ifndef _WORLD_H
     
    8181  virtual void displayLoadScreen();
    8282  virtual void releaseLoadScreen();
    83  
     83
    8484  /* command node functions */
    8585  bool command (Command* cmd);
     
    9090  void spawn (WorldEntity* entity);
    9191  void spawn (WorldEntity* entity, Vector* absCoor, Quaternion* absDir);
    92   void spawn(WorldEntity* entity, PNode* parentNode, Vector* relCoor, Quaternion* relDir, 
    93              int parentingMode);
     92  void spawn(WorldEntity* entity, PNode* parentNode, Vector* relCoor, Quaternion* relDir,
     93             int parentingMode);
    9494
    9595  const char* getPath();
     
    102102
    103103  Uint32 lastFrame;                   //!< last time of frame
     104  Uint32 cycle;                       //!< The cycle we are in (starts with 0 and rises with every frame)
    104105  Uint32 dt;                          //!< time needed to calculate this frame
    105106  float dtS;                          //!< The time needed for caluculations in seconds
Note: See TracChangeset for help on using the changeset viewer.