- Timestamp:
- Dec 20, 2005, 9:57:31 PM (19 years ago)
- Location:
- branches/christmas_branche/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/christmas_branche/src/lib/graphics/importer/md2Model.cc
r6191 r6198 155 155 156 156 157 158 159 157 /** 160 158 \brief sets the time in seconds passed since the last tick -
branches/christmas_branche/src/lib/graphics/importer/md2Model.h
r6191 r6198 218 218 219 219 void setAnim(int type); 220 /** 221 * scales the current model 222 * @param scaleFactor: the factor [0..1] to use for scaling 223 */ 220 /** returns the current animation @returns animation type */ 221 inline int MD2Model::getAnim() { return this->animationState.type; } 222 /** scales the current model @param scaleFactor: the factor [0..1] to use for scaling */ 224 223 void scaleModel(float scaleFactor) { this->scaleFactor = scaleFactor;} 225 224 -
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.