Changeset 2115 in orxonox.OLD for orxonox/branches/chris/src/player.cc
- Timestamp:
- Jul 13, 2004, 10:49:20 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/chris/src/player.cc
r2112 r2115 61 61 void Player::command (Command* cmd) 62 62 { 63 printf("Player|recieved command [%s]\n", cmd->cmd); 63 64 if( !strcmp( cmd->cmd, "up")) bUp = !cmd->bUp; 64 65 else if( !strcmp( cmd->cmd, "down")) bDown = !cmd->bUp; … … 71 72 { 72 73 glMatrixMode(GL_MODELVIEW); 74 glLoadIdentity(); 73 75 float matrix[4][4]; 74 get_placement()->w.matrix (matrix);75 glLoadMatrixf ((float*)matrix);76 76 77 77 glTranslatef(get_placement()->r.x,get_placement()->r.y,get_placement()->r.z); 78 get_placement()->w.matrix (matrix); 79 glMultMatrixf ((float*)matrix); 78 80 79 81 glBegin(GL_TRIANGLES); 80 82 glColor3f(1,0,0); 81 glVertex3f(0,0,0 );83 glVertex3f(0,0,0.5); 82 84 glColor3f(0,1,0); 83 glVertex3f(- 1,-0.5,0);85 glVertex3f(-0.5,0,-1); 84 86 glColor3f(0,0,1); 85 glVertex3f( -1,+0.5,0);87 glVertex3f(0.5,0,-1); 86 88 glEnd(); 87 89 … … 123 125 124 126 velocity = velocity + (accel * time); 127 printf("Player|velocity %f/%f/%f\n", velocity.x, velocity.y, velocity.z); 125 128 } 126 129
Note: See TracChangeset
for help on using the changeset viewer.