Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9122 in orxonox.OLD


Ignore:
Timestamp:
Jul 4, 2006, 2:08:14 PM (18 years ago)
Author:
rennerc
Message:

move weapon

Location:
branches/presentation/src/world_entities
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/world_entities/creatures/fps_player.cc

    r9110 r9122  
    191191  this->getWeaponManager().getFixedTarget()->setParent(State::getCameraTargetNode());
    192192  this->getWeaponManager().getFixedTarget()->setRelCoor(0,0,0);
    193 
    194 
    195   AABB* box = this->getModelAABB();
    196   if( box != NULL)
    197   {
    198     State::getCameraNode()->setRelCoor(0, box->halfLength[1] * 2.0f, 0);
    199     State::getCameraTargetNode()->setRelCoor(10, box->halfLength[1] * 2.0f, 0);
    200 
    201     this->getWeaponManager().setSlotPosition(0, Vector(1.5, box->halfLength[1] * 2.0f - 0.7, 1.1));
    202     this->getWeaponManager().setSlotPosition(1, Vector(5.0, box->halfLength[1] * 2.0f, 0.0));
    203   }
    204193}
    205194
     
    387376}
    388377
    389 
    390 
    391 
     378void FPSPlayer::respawn( )
     379{
     380  Playable::respawn();
     381 
     382  AABB* box = this->getModelAABB();
     383  if( box != NULL)
     384  {
     385    float f = 1.3f;
     386    State::getCameraNode()->setRelCoor(0, box->halfLength[1] * f, 0);
     387    State::getCameraTargetNode()->setRelCoor(10, box->halfLength[1] * f, 0);
     388
     389    this->getWeaponManager().setSlotPosition(0, Vector(1.5, box->halfLength[1] * f - 0.7, 1.1));
     390    this->getWeaponManager().setSlotPosition(1, Vector(5.0, box->halfLength[1] * f, 0.0));
     391  }
     392}
     393
     394
     395
     396
  • branches/presentation/src/world_entities/creatures/fps_player.h

    r9110 r9122  
    2626
    2727    virtual void reset();
    28 
     28   
     29    virtual void respawn();
    2930
    3031    virtual void tick(float time);
  • branches/presentation/src/world_entities/world_entity.cc

    r9119 r9122  
    156156  this->modelLODName = fileName;
    157157  this->scaling = scaling;
    158  
    159   if ( isA( CL_FPS_PLAYER ) )
    160     PRINTF(0)("\n\n\n\n\n\n\n\n\n\n%f\n\n\n\n\n\n\n\n\n\n", scaling);
    161158
    162159  std::string name = fileName;
Note: See TracChangeset for help on using the changeset viewer.