Changeset 3226 in orxonox.OLD for orxonox/trunk/src/player.cc
- Timestamp:
- Dec 20, 2004, 12:27:51 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/player.cc
r3210 r3226 26 26 { 27 27 28 this->obj = new Object 28 this->obj = new Object("reaplow.obj"); 29 29 /* 30 30 objectList = glGenLists(1); … … 54 54 } 55 55 56 Player::~Player ()56 Player::~Player() 57 57 { 58 58 delete this->obj; 59 59 } 60 60 61 void Player::post _spawn()61 void Player::postSpawn() 62 62 { 63 63 travel_speed = 15.0; … … 66 66 bFire = false; 67 67 acceleration = 10.0; 68 set _collision (new CollisionCluster(1.0, Vector(0,0,0)));68 setSollision(new CollisionCluster(1.0, Vector(0,0,0))); 69 69 } 70 70 71 void Player::tick 71 void Player::tick(float time) 72 72 { 73 73 // movement … … 75 75 } 76 76 77 void Player::hit 77 void Player::hit(WorldEntity* weapon, Vector loc) 78 78 { 79 79 } 80 80 81 void Player::destroy 81 void Player::destroy() 82 82 { 83 83 } 84 84 85 void Player::collide (WorldEntity* other,Uint32 ownhitflags, Uint32 otherhitflags)85 void Player::collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags) 86 86 { 87 87 } 88 88 89 void Player::command 89 void Player::command(Command* cmd) 90 90 { 91 91 //printf("Player|recieved command [%s]\n", cmd->cmd); … … 97 97 } 98 98 99 void Player::draw 99 void Player::draw() 100 100 { 101 101 glMatrixMode(GL_MODELVIEW); … … 103 103 float matrix[4][4]; 104 104 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); 106 106 get_placement()->w.matrix (matrix); 107 glMultMatrixf 107 glMultMatrixf((float*)matrix); 108 108 109 glMatrixMode 110 glRotatef 109 glMatrixMode(GL_MODELVIEW); 110 glRotatef(-90, 0,1,0); 111 111 obj->draw(); 112 // glCallList 112 // glCallList(objectList); 113 113 114 114 … … 117 117 } 118 118 119 void Player::get _lookat(Location* locbuf)119 void Player::getLookat(Location* locbuf) 120 120 { 121 121 *locbuf = *get_location(); … … 123 123 } 124 124 125 void Player::left _world()125 void Player::leftWorld() 126 126 { 127 127 } 128 128 129 void Player::move 129 void Player::move(float time) 130 130 { 131 131 Vector accel(0.0, 0.0, 0.0); … … 158 158 l->pos = l->pos + accel*time; 159 159 } 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.