Changeset 5205 in orxonox.OLD for trunk/src/story_entities
- Timestamp:
- Sep 18, 2005, 10:37:20 PM (19 years ago)
- Location:
- trunk/src/story_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/story_entities/world.cc
r5175 r5205 20 20 #include "world.h" 21 21 22 #include "shell_command.h" 22 23 23 24 #include "state.h" … … 73 74 #include "npc.h" 74 75 76 SHELL_COMMAND(speed, World, setSpeed); 77 75 78 using namespace std; 76 79 … … 163 166 this->debugWorldNr = worldID; 164 167 168 this->setSpeed(1.0); 165 169 this->music = NULL; 166 170 } … … 870 874 } 871 875 872 this->dtS = (float)this->dt / 1000.0 ;876 this->dtS = (float)this->dt / 1000.0 * this->speed; 873 877 this->gameTime += this->dtS; 874 878 -
trunk/src/story_entities/world.h
r5039 r5205 68 68 void spawn(WorldEntity* entity, PNode* parentNode, Vector* relCoor, Quaternion* relDir); 69 69 70 /** @param speed sets the speed of the Game */ 71 inline void setSpeed(float speed) { this->speed = speed; }; 70 72 const char* getPath(); 71 73 void setPath( const char* name); … … 80 82 Uint32 dt; //!< time needed to calculate this frame (in milliSeconds) 81 83 float dtS; //!< The time needed for caluculations in seconds 84 float speed; //!< how fast the game flows 82 85 double gameTime; //!< this is where the game time is saved 83 86 bool bQuitOrxonox; //!< quit this application
Note: See TracChangeset
for help on using the changeset viewer.