Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3227 in orxonox.OLD for orxonox/trunk/src


Ignore:
Timestamp:
Dec 20, 2004, 12:32:15 AM (19 years ago)
Author:
bensch
Message:

player fixed

Location:
orxonox/trunk/src
Files:
2 edited

Legend:

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

    r3226 r3227  
    6161void Player::postSpawn()
    6262{
    63   travel_speed = 15.0;
     63  travelSpeed = 15.0;
    6464  velocity = Vector();
    6565  bUp = bDown = bLeft = bRight = bAscend = bDescend = false;
    6666  bFire = false;
    6767  acceleration = 10.0;
    68   setSollision(new CollisionCluster(1.0, Vector(0,0,0)));
     68  setCollision(new CollisionCluster(1.0, Vector(0,0,0)));
    6969}
    7070
     
    103103  float matrix[4][4];
    104104 
    105   glTranslatef(get_placement()->r.x, get_placement()->r.y, get_placement()->r.z);
     105  glTranslatef(getPlacement()->r.x, getPlacement()->r.y, getPlacement()->r.z);
    106106  get_placement()->w.matrix (matrix);
    107107  glMultMatrixf((float*)matrix);
     
    114114 
    115115 
    116   //printf("Player@%f/%f/%f\n", get_placement()->r.x, get_placement()->r.y, get_placement()->r.z);
    117116}
    118117
    119118void Player::getLookat(Location* locbuf)
    120119{
    121   *locbuf = *get_location();
     120  *locbuf = *getLocation();
    122121  //locbuf->dist += 5.0;
    123122}
     
    130129{
    131130  Vector accel(0.0, 0.0, 0.0);
    132   /* FIXME: calculating the direction and orthDirection every time_slice is redundant! save it somewhere */
    133   Placement *pos = get_placement();
     131  /* FIXME: calculating the direction and orthDirection every timeSlice is redundant! save it somewhere */
     132  Placement *pos = getPlacement();
    134133  /* calculate the direction in which the craft is heading  */
    135134  Vector direction(0.0, 0.0, 1.0);
     
    145144  if( bDescend) {/* FIXME */} /* \todo up and down player movement */
    146145
    147   Location* l = get_location();
     146  Location* l = getLocation();
    148147 
    149148  // r(t) = r(0) + v(0)*t + 1/2*a*t^2
     
    153152
    154153  /* this the base-speed of the player: determines how fast and how the player follows the track*/
    155   l->dist = l->dist + travel_speed * time;
     154  l->dist = l->dist + travelSpeed * time;
    156155
    157156  /* this updates the player position on the track - user interaction */
  • orxonox/trunk/src/player.h

    r3226 r3227  
    3535  bool bFire;
    3636  Vector velocity;
    37   float travel_speed;
     37  float travelSpeed;
    3838  float acceleration;
    3939  GLuint objectList;
Note: See TracChangeset for help on using the changeset viewer.