Changeset 3583 in orxonox.OLD for orxonox/trunk/src/world_entities/player.cc
- Timestamp:
- Mar 16, 2005, 11:08:33 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/player.cc
r3578 r3583 20 20 //#include "collision.h" 21 21 #include "objModel.h" 22 #include "list.h" 23 #include "weapon.h" 22 24 23 25 using namespace std; … … 30 32 { 31 33 this->model = new OBJModel("../data/models/reaplow.obj"); 34 this->weapons = new tList<Weapon>(); 32 35 } 33 36 … … 37 40 Player::~Player () 38 41 { 39 40 } 42 Weapon* w = this->weapons->enumerate(); 43 while( w != NULL) 44 { 45 delete w; 46 w = this->weapons->nextElement(); 47 } 48 delete this->weapons; 49 } 50 51 52 /** 53 \brief adds a weapon to the weapon list of player 54 \param weapon to add 55 */ 56 void Player::addWeapon(Weapon* weapon) 57 { 58 this->weapons->add(weapon); 59 } 60 61 62 /** 63 \brief removes a weapon from the player 64 \param weapon to remove 65 */ 66 void Player::removeWeapon(Weapon* weapon) 67 { 68 this->weapons->remove(weapon); 69 } 70 41 71 42 72 /**
Note: See TracChangeset
for help on using the changeset viewer.