Changeset 6198 in orxonox.OLD for branches/christmas_branche/src/world_entities
- Timestamp:
- Dec 20, 2005, 9:57:31 PM (19 years ago)
- Location:
- branches/christmas_branche/src/world_entities/creatures
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/christmas_branche/src/world_entities/creatures/md2_creature.cc
r6195 r6198 137 137 this->registerEvent(SDLK_a); 138 138 this->registerEvent(SDLK_d); 139 this->registerEvent(SDLK_SPACE); 139 140 this->registerEvent(SDLK_q); 140 141 this->registerEvent(SDLK_e); … … 256 257 Vector move = this->velocity * time; 257 258 this->shiftCoor (move); 259 260 if( this->bJump) 261 { 262 if( ((MD2Model*)this->getModel(0))->getAnim() != JUMP) ((MD2Model*)this->getModel(0))->setAnim(JUMP); 263 } 264 else if( fabs(move.len()) > 0.0f) 265 { 266 if( ((MD2Model*)this->getModel(0))->getAnim() != RUN) ((MD2Model*)this->getModel(0))->setAnim(RUN); 267 } 268 else 269 { 270 if( ((MD2Model*)this->getModel(0))->getAnim() != STAND) ((MD2Model*)this->getModel(0))->setAnim(STAND); 271 } 258 272 259 273 //orient the MD2Creature in direction of the mouse … … 349 363 else if ( event.type == KeyMapper::PEV_PREVIOUS_WEAPON && event.bPressed) 350 364 this->getWeaponManager()->previousWeaponConfig(); 351 352 365 else if( event.type == SDLK_w) 353 366 this->bUp = event.bPressed; //this->shiftCoor(0,.1,0); 354 367 else if( event.type == SDLK_s) 355 368 this->bDown = event.bPressed; //this->shiftCoor(0,-.1,0); 369 else if( event.type == SDLK_SPACE) 370 this->bJump = event.bPressed; 356 371 else if( event.type == EV_MOUSE_MOTION) 357 372 { -
branches/christmas_branche/src/world_entities/creatures/md2_creature.h
r6195 r6198 60 60 bool bStrafeL; //!< strafe to the left side 61 61 bool bStrafeR; //!< strafe to the rith side 62 bool bJump; //!< jump 62 63 63 64 float xMouse; //!< mouse moved in x-Direction
Note: See TracChangeset
for help on using the changeset viewer.