Changeset 3585 in orxonox.OLD for orxonox/trunk/src/world_entities
- Timestamp:
- Mar 16, 2005, 11:59:51 PM (20 years ago)
- Location:
- orxonox/trunk/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/player.cc
r3584 r3585 33 33 this->model = new OBJModel("../data/models/reaplow.obj"); 34 34 this->weapons = new tList<Weapon>(); 35 this->activeWeapon = NULL; 36 37 travelSpeed = 15.0; 38 velocity = Vector(); 39 bUp = bDown = bLeft = bRight = bAscend = bDescend = false; 40 bFire = false; 41 acceleration = 10.0; 35 42 } 36 43 … … 47 54 } 48 55 delete this->weapons; 56 57 //delete this->velocity; 49 58 } 50 59 … … 75 84 void Player::postSpawn () 76 85 { 77 travelSpeed = 15.0;78 velocity = Vector();79 bUp = bDown = bLeft = bRight = bAscend = bDescend = false;80 bFire = false;81 acceleration = 10.0;82 86 //setCollision(new CollisionCluster(1.0, Vector(0,0,0))); 83 87 } … … 182 186 if(this->bFire) 183 187 { 184 188 if(this->activeWeapon != NULL) 189 this->activeWeapon->fire(); 185 190 } 186 191 if(this->bWeaponChange) 187 192 { 188 193 Weapon* w = this->weapons->enumerate(); 194 this->activeWeapon = this->weapons->nextElement(this->activeWeapon); 189 195 } 190 196 } … … 199 205 void Player::command (Command* cmd) 200 206 { 201 //printf("Player|recieved command [%s]\n", cmd->cmd);207 PRINTF(3)("recieved command [%s]\n", cmd->cmd); 202 208 if( !strcmp( cmd->cmd, "up")) this->bUp = !cmd->bUp; 203 209 else if( !strcmp( cmd->cmd, "down")) this->bDown = !cmd->bUp; -
orxonox/trunk/src/world_entities/player.h
r3584 r3585 43 43 bool bDescend; //!< descend button presses. 44 44 bool bFire; //!< fire button pressed. 45 bool bWeaponChange; 45 bool bWeaponChange; //!< weapon change button pressed 46 46 47 47 tList<Weapon>* weapons;//!< a list of weapon 48 Weapon* activeWeapon; //!< the weapon that is currenty activated 48 49 49 50 Vector velocity; //!< the velocity of the player.
Note: See TracChangeset
for help on using the changeset viewer.