Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 20, 2005, 2:47:35 AM (18 years ago)
Author:
patrick
Message:

christmas: the md2model has now const draw functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/christmas_branche/src/world_entities/creatures/md2_creature.cc

    r6174 r6175  
    241241    ((MD2Model*)this->models[0])->draw();
    242242
    243   this->getWeaponManager()->draw();
    244 
    245 
    246   //this->debug(0);
     243  //this->getWeaponManager()->draw();
    247244}
    248245
     
    260257
    261258
    262   // MD2Creature controlled movement
    263   this->calculateVelocity(time);
    264 
    265   Vector move = (velocity)*time;
    266 
    267   //orient the velocity in the direction of the MD2Creature.
    268   travelSpeed = velocity.len();
    269   velocity += ((this->getAbsDirX())*travelSpeed-velocity)*airViscosity;
    270   velocity = (velocity.getNormalized())*travelSpeed;
    271 
    272   //orient the MD2Creature in direction of the mouse
    273    rotQuat = Quaternion::quatSlerp( this->getAbsDir(),mouseDir,fabsf(time)*3);
    274    if (this->getAbsDir().distance(rotQuat) > 0.001)
    275     this->setAbsDir( rotQuat);
    276    //this->setAbsDirSoft(mouseDir,5);
    277 
    278   // this is the air friction (necessary for a smooth control)
    279   if(velocity.len() != 0) velocity -= velocity*0.01;
    280 
    281   //hoover effect
    282   cycle += time;
    283   this->shiftCoor(Vector(0,1,0)*cos(this->cycle*2.0)*0.02);
    284 
    285   //readjust
    286  // if (this->getAbsDirZ().y > 0.1) this->shiftDir(Quaternion(time*0.3, Vector(1,0,0)));
    287   //else if (this->getAbsDirZ().y < -0.1) this->shiftDir(Quaternion(-time*0.3, Vector(1,0,0)));
    288 
    289   //SDL_WarpMouse(GraphicsEngine::getInstance()->getResolutionX()/2, GraphicsEngine::getInstance()->getResolutionY()/2);
    290 
    291   this->shiftCoor (move);
    292 
    293   this->getWeaponManager()->tick(time);
    294   // weapon system manipulation
    295   this->weaponAction();
     259//   // MD2Creature controlled movement
     260//   this->calculateVelocity(time);
     261//
     262//   Vector move = (velocity)*time;
     263//
     264//   //orient the velocity in the direction of the MD2Creature.
     265//   travelSpeed = velocity.len();
     266//   velocity += ((this->getAbsDirX())*travelSpeed-velocity)*airViscosity;
     267//   velocity = (velocity.getNormalized())*travelSpeed;
     268//
     269//   //orient the MD2Creature in direction of the mouse
     270//    rotQuat = Quaternion::quatSlerp( this->getAbsDir(),mouseDir,fabsf(time)*3);
     271//    if (this->getAbsDir().distance(rotQuat) > 0.001)
     272//     this->setAbsDir( rotQuat);
     273//    //this->setAbsDirSoft(mouseDir,5);
     274//
     275//   // this is the air friction (necessary for a smooth control)
     276//   if(velocity.len() != 0) velocity -= velocity*0.01;
     277//
     278//   //hoover effect
     279//   cycle += time;
     280//   this->shiftCoor(Vector(0,1,0)*cos(this->cycle*2.0)*0.02);
     281//
     282//   //readjust
     283// // if (this->getAbsDirZ().y > 0.1) this->shiftDir(Quaternion(time*0.3, Vector(1,0,0)));
     284//   //else if (this->getAbsDirZ().y < -0.1) this->shiftDir(Quaternion(-time*0.3, Vector(1,0,0)));
     285//
     286//   //SDL_WarpMouse(GraphicsEngine::getInstance()->getResolutionX()/2, GraphicsEngine::getInstance()->getResolutionY()/2);
     287//
     288//   this->shiftCoor (move);
     289//
     290//   this->getWeaponManager()->tick(time);
     291//   // weapon system manipulation
     292//   this->weaponAction();
    296293}
    297294
Note: See TracChangeset for help on using the changeset viewer.