Changeset 8964 in orxonox.OLD
- Timestamp:
- Jun 30, 2006, 3:43:48 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/single_player_map/src/world_entities/npcs/generic_npc.cc
r8963 r8964 190 190 break; 191 191 case Run: 192 { 192 193 if( this->getAnimation() != RUN) 193 194 this->setAnimation(RUN, MD2_ANIM_LOOP); 195 196 Vector dir = (currentAnimation.v - this->getAbsCoor()).getNormalized(); 197 this->setAbsDir(Quaternion(dir, Vector(0.0, 1.0, 0.0)) * Quaternion(-M_PI_2, Vector(0.0, 1.0, 0.0))); 198 } 194 199 break; 195 200 case Crouch: 201 { 196 202 if( this->getAnimation() != CROUCH_WALK) 197 203 this->setAnimation(CROUCH_WALK, MD2_ANIM_LOOP); 204 205 Vector dir = (currentAnimation.v - this->getAbsCoor()).getNormalized(); 206 this->setAbsDir(Quaternion(dir, Vector(0.0, 1.0, 0.0)) * Quaternion(-M_PI_2, Vector(0.0, 1.0, 0.0))); 207 } 198 208 break; 199 209 case LookAt: … … 240 250 break; 241 251 case Run: 252 { 242 253 if( this->getAnimation() != RUN) 243 254 this->setAnimation(RUN, MD2_ANIM_LOOP); 255 256 Vector dir = (currentAnimation.v - this->getAbsCoor()).getNormalized(); 257 this->setAbsDirSoft(Quaternion(dir, Vector(0.0, 1.0, 0.0)) * Quaternion(-M_PI_2, Vector(0.0, 1.0, 0.0)), 4.0); 258 } 244 259 break; 245 260 case Crouch: 261 { 246 262 if( this->getAnimation() != CROUCH_WALK) 247 263 this->setAnimation(CROUCH_WALK, MD2_ANIM_LOOP); 264 265 Vector dir = (currentAnimation.v - this->getAbsCoor()).getNormalized(); 266 this->setAbsDirSoft(Quaternion(dir, Vector(0.0, 1.0, 0.0)) * Quaternion(-M_PI_2, Vector(0.0, 1.0, 0.0)), 4.0); 267 } 248 268 break; 249 269 case LookAt: 270 { 250 271 if( this->getAnimation() != STAND) 251 272 this->setAnimation(STAND, MD2_ANIM_LOOP); 273 } 252 274 break; 253 275 case Shoot:
Note: See TracChangeset
for help on using the changeset viewer.