Changeset 3227 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Dec 20, 2004, 12:32:15 AM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/player.cc
r3226 r3227 61 61 void Player::postSpawn() 62 62 { 63 travel _speed = 15.0;63 travelSpeed = 15.0; 64 64 velocity = Vector(); 65 65 bUp = bDown = bLeft = bRight = bAscend = bDescend = false; 66 66 bFire = false; 67 67 acceleration = 10.0; 68 set Sollision(new CollisionCluster(1.0, Vector(0,0,0)));68 setCollision(new CollisionCluster(1.0, Vector(0,0,0))); 69 69 } 70 70 … … 103 103 float matrix[4][4]; 104 104 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); 106 106 get_placement()->w.matrix (matrix); 107 107 glMultMatrixf((float*)matrix); … … 114 114 115 115 116 //printf("Player@%f/%f/%f\n", get_placement()->r.x, get_placement()->r.y, get_placement()->r.z);117 116 } 118 117 119 118 void Player::getLookat(Location* locbuf) 120 119 { 121 *locbuf = *get _location();120 *locbuf = *getLocation(); 122 121 //locbuf->dist += 5.0; 123 122 } … … 130 129 { 131 130 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(); 134 133 /* calculate the direction in which the craft is heading */ 135 134 Vector direction(0.0, 0.0, 1.0); … … 145 144 if( bDescend) {/* FIXME */} /* \todo up and down player movement */ 146 145 147 Location* l = get _location();146 Location* l = getLocation(); 148 147 149 148 // r(t) = r(0) + v(0)*t + 1/2*a*t^2 … … 153 152 154 153 /* 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; 156 155 157 156 /* this updates the player position on the track - user interaction */ -
orxonox/trunk/src/player.h
r3226 r3227 35 35 bool bFire; 36 36 Vector velocity; 37 float travel _speed;37 float travelSpeed; 38 38 float acceleration; 39 39 GLuint objectList;
Note: See TracChangeset
for help on using the changeset viewer.