Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5482 in orxonox.OLD for trunk


Ignore:
Timestamp:
Nov 3, 2005, 10:33:28 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: VERY simplistic Banking of the Player

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/subprojects/collision_detection/collision_detection.cc

    r5115 r5482  
    255255  {
    256256    if( likely(drawModel))
    257     entity->draw();
     257      entity->draw();
    258258    entity->drawBVTree(depth, drawMode);
    259259    printf("%i, %i\n", depth, drawMode);
  • trunk/src/util/loading/resource_manager.cc

    r5480 r5482  
    156156    return true;
    157157  }
     158  return false;
    158159}
    159160
  • trunk/src/world_entities/player.cc

    r5453 r5482  
    286286  if( this->bDown && this->getRelCoor().x > -5)
    287287    accel = accel -(direction*acceleration);
    288   if( this->bLeft &&  TrackManager::getInstance()->getWidth() > -this->getRelCoor().z*2)
    289     accel = accel - (orthDirection*acceleration);
    290   if( this->bRight &&  TrackManager::getInstance()->getWidth() > this->getRelCoor().z*2)
     288  if( this->bLeft)
     289  {
     290    if( TrackManager::getInstance()->getWidth() > -this->getRelCoor().z*2)
     291      accel = accel - (orthDirection*acceleration);
     292    else
     293      this->setRelDirSoft(Quaternion(0, Vector(1,0,0)), 5);
     294  }
     295  if( this->bRight)
     296  {
     297   if (TrackManager::getInstance()->getWidth() > this->getRelCoor().z*2)
    291298    accel = accel + (orthDirection*acceleration);
     299   else
     300     this->setRelDirSoft(Quaternion(0, Vector(1,0,0)), 5);
     301  }
    292302  if( this->bAscend ) { /* FIXME */ }
    293303  if( this->bDescend) {/* FIXME */} /* @todo up and down player movement */
     
    319329      this->bDown = event.bPressed;
    320330  else if( event.type == KeyMapper::PEV_RIGHT)
     331  {
    321332      this->bRight= event.bPressed;
     333      if (event.bPressed)
     334        this->setRelDirSoft(Quaternion(.4, Vector(1,0,0)), 5);
     335      else
     336        this->setRelDirSoft(Quaternion(0, Vector(1,0,0)), 5);
     337  }
    322338  else if( event.type == KeyMapper::PEV_LEFT)
     339  {
    323340      this->bLeft = event.bPressed;
     341      if (event.bPressed)
     342        this->setRelDirSoft(Quaternion(-.4, Vector(1,0,0)), 5);
     343      else
     344        this->setRelDirSoft(Quaternion(0, Vector(1,0,0)), 5);
     345  }
    324346  else if( event.type == KeyMapper::PEV_FIRE1)
    325347      this->bFire = event.bPressed;
  • trunk/src/world_entities/world_entity.cc

    r5465 r5482  
    105105    delete this->obbTree;
    106106
    107   if (this->model)
     107  if (this->model != NULL)
    108108  {
    109109    PRINTF(4)("creating obb tree\n");
Note: See TracChangeset for help on using the changeset viewer.