Changeset 3596 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Mar 17, 2005, 6:03:46 PM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/defs/debug.h
r3594 r3596 47 47 #define DEBUG_MODULE_ORXONOX 0 48 48 #define DEBUG_MODULE_WORLD 0 49 #define DEBUG_MODULE_PNODE 049 #define DEBUG_MODULE_PNODE 3 50 50 #define DEBUG_MODULE_WORLD_ENTITY 0 51 51 #define DEBUG_MODULE_COMMAND_NODE 0 -
orxonox/trunk/src/story_entities/world.cc
r3590 r3596 239 239 Vector* cameraOffset = new Vector (-10, 5, 0); 240 240 this->localCamera->setRelCoor (cameraOffset); 241 trackManager->condition(2, NEAREST, this->localPlayer);241 trackManager->condition(2, LEFTRIGHT, this->localPlayer); 242 242 243 243 break; -
orxonox/trunk/src/track_manager.cc
r3595 r3596 42 42 this->endTime = 1; 43 43 this->jumpTime = 0; 44 this->width = TMAN_DEFAULT_WIDTH; 44 45 this->nodeCount = 0; 45 46 this->childCount = 0; … … 760 761 761 762 /** 763 \returns the current Width of the track 764 */ 765 float TrackManager::getWidth(void) const 766 { 767 return this->currentTrackElem->width; 768 } 769 770 /** 762 771 \brief Advances the local-time of the Track around dt 763 772 \param dt The time about which to advance. -
orxonox/trunk/src/track_manager.h
r3594 r3596 22 22 #define TMAN_DEFAULT_CURVETYPE BEZIERCURVE 23 23 #define TMAN_DEFAULT_DURATION 10 24 24 #define TMAN_DEFAULT_WIDTH 10 25 25 26 26 //! A Graph-Element, that holds the curve-structure of a Level. … … 54 54 float endTime; //!< The time at which this Track ends. 55 55 float jumpTime; //!< The Time this Track has to jump to its preceding Track (only >0 if Track isJoined==true) 56 float width; //!< Th width of the Path. This tells the Player(s), how far he(they) can go to the left/right. 56 57 int nodeCount; //!< The count of points this TrackElement has. 57 58 Curve* curve; //!< The Curve of this TrackElement … … 166 167 inline Vector calcPos(void) const; 167 168 inline Vector calcDir(void) const; 169 float getWidth(void) const; 168 170 void tick(float dt); 169 171 void jumpTo(float time); -
orxonox/trunk/src/world_entities/player.cc
r3590 r3596 19 19 20 20 #include "player.h" 21 21 22 #include "stdincl.h" 22 23 //#include "collision.h" … … 24 25 #include "list.h" 25 26 #include "weapon.h" 27 #include "track_manager.h" 26 28 27 29 using namespace std; … … 169 171 //orthDirection = orthDirection.cross (direction); 170 172 171 if( this->bUp) { accel = accel+(direction*acceleration); } 172 if( this->bDown) { accel = accel-(direction*acceleration); } 173 if( this->bLeft ) { accel = accel - (orthDirection*acceleration); } 174 if( this->bRight ) { accel = accel + (orthDirection*acceleration); } 175 if( this->bAscend ) { /* not yet implemented but just: (0,0,1)*acceleration */} 173 if( this->bUp && this->getRelCoor().x < 20) 174 accel = accel+(direction*acceleration); 175 if( this->bDown && this->getRelCoor().x > -5) 176 accel = accel-(direction*acceleration); 177 if( this->bLeft && TrackManager::getInstance()->getWidth() > -this->getRelCoor().z*2) 178 accel = accel - (orthDirection*acceleration); 179 if( this->bRight && TrackManager::getInstance()->getWidth() > this->getRelCoor().z*2) 180 accel = accel + (orthDirection*acceleration); 181 if( this->bAscend ) 176 182 if( this->bDescend) {/* FIXME */} /* \todo up and down player movement */ 177 183
Note: See TracChangeset
for help on using the changeset viewer.