Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3226 in orxonox.OLD for orxonox/trunk/src/player.cc


Ignore:
Timestamp:
Dec 20, 2004, 12:27:51 AM (21 years ago)
Author:
bensch
Message:

orxonox/trunk: world fixed (still unstable)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/player.cc

    r3210 r3226  
    2626{
    2727
    28   this->obj = new Object ("reaplow.obj");
     28  this->obj = new Object("reaplow.obj");
    2929  /*
    3030  objectList = glGenLists(1);
     
    5454}
    5555
    56 Player::~Player ()
     56Player::~Player()
    5757{
    5858  delete this->obj;
    5959}
    6060
    61 void Player::post_spawn ()
     61void Player::postSpawn()
    6262{
    6363  travel_speed = 15.0;
     
    6666  bFire = false;
    6767  acceleration = 10.0;
    68   set_collision (new CollisionCluster (1.0, Vector(0,0,0)));
     68  setSollision(new CollisionCluster(1.0, Vector(0,0,0)));
    6969}
    7070
    71 void Player::tick (float time)
     71void Player::tick(float time)
    7272{
    7373  // movement
     
    7575}
    7676
    77 void Player::hit (WorldEntity* weapon, Vector loc)
     77void Player::hit(WorldEntity* weapon, Vector loc)
    7878{
    7979}
    8080
    81 void Player::destroy ()
     81void Player::destroy()
    8282{
    8383}
    8484
    85 void Player::collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags)
     85void Player::collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags)
    8686{
    8787}
    8888
    89 void Player::command (Command* cmd)
     89void Player::command(Command* cmd)
    9090{
    9191  //printf("Player|recieved command [%s]\n", cmd->cmd);
     
    9797}
    9898
    99 void Player::draw ()
     99void Player::draw()
    100100{
    101101  glMatrixMode(GL_MODELVIEW);
     
    103103  float matrix[4][4];
    104104 
    105   glTranslatef(get_placement()->r.x,get_placement()->r.y,get_placement()->r.z);
     105  glTranslatef(get_placement()->r.x, get_placement()->r.y, get_placement()->r.z);
    106106  get_placement()->w.matrix (matrix);
    107   glMultMatrixf ((float*)matrix);
     107  glMultMatrixf((float*)matrix);
    108108 
    109   glMatrixMode (GL_MODELVIEW);
    110   glRotatef (-90, 0,1,0);
     109  glMatrixMode(GL_MODELVIEW);
     110  glRotatef(-90, 0,1,0);
    111111  obj->draw();
    112   // glCallList (objectList);
     112  // glCallList(objectList);
    113113
    114114 
     
    117117}
    118118
    119 void Player::get_lookat (Location* locbuf)
     119void Player::getLookat(Location* locbuf)
    120120{
    121121  *locbuf = *get_location();
     
    123123}
    124124
    125 void Player::left_world ()
     125void Player::leftWorld()
    126126{
    127127}
    128128
    129 void Player::move (float time)
     129void Player::move(float time)
    130130{
    131131  Vector accel(0.0, 0.0, 0.0);
     
    158158  l->pos = l->pos + accel*time;
    159159}
    160 
    161 
    162 
    163 
    164 
    165 
    166 
    167 
    168 
    169 
    170 
    171 
    172 
    173 
    174 
    175 
    176 
    177 
Note: See TracChangeset for help on using the changeset viewer.