- Timestamp:
- Nov 26, 2008, 7:42:29 PM (16 years ago)
- Location:
- code/branches/weapon2/src/orxonox/objects/worldentities/pawns
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Pawn.cc
r2273 r2288 52 52 53 53 this->lastHitOriginator_ = 0; 54 this->weaponSystem_ = 0;55 54 56 55 //WeaponSystem … … 58 57 WeaponSet * weaponSet1 = new WeaponSet(this,1); 59 58 this->weaponSystem_->attachWeaponSet(weaponSet1); 59 //totally bad solution... 60 weaponSet1->setParentWeaponSystem(weaponSystem_); 60 61 61 62 … … 74 75 XMLPortParam(Pawn, "maxhealth", setMaxHealth, getMaxHealth, xmlelement, mode).defaultValues(200); 75 76 XMLPortParam(Pawn, "initialhealth", setInitialHealth, getInitialHealth, xmlelement, mode).defaultValues(100); 76 } 77 78 XMLPortObject(Pawn, WeaponSlot, "weaponslots", setWeaponSlot, getWeaponSlot, xmlelement, mode); 79 //XMLPortObject(Pawn, WeaponPack, "weapons", setWeaponPack, getWeaponPack, xmlelement, mode); 80 81 } 77 82 78 83 void Pawn::registerVariables() … … 137 142 void Pawn::fire(WeaponMode::Enum fireMode) 138 143 { 144 COUT(0) << "Pawn::fire" << std::endl; 139 145 if (this->weaponSystem_) 140 146 this->weaponSystem_->fire(fireMode); … … 146 152 this->spawn(); 147 153 } 154 155 void Pawn::setWeaponSlot(WeaponSlot * wSlot) 156 { 157 this->weaponSystem_->attachWeaponSlot(wSlot); 158 } 159 160 WeaponSlot * Pawn::getWeaponSlot(unsigned int index) const 161 { 162 return this->weaponSystem_->getWeaponSlotPointer(index); 163 } 164 148 165 } -
code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Pawn.h
r2145 r2288 79 79 virtual void postSpawn(); 80 80 81 void setWeaponSlot(WeaponSlot * wSlot); 82 WeaponSlot * getWeaponSlot(unsigned int index) const; 83 81 84 protected: 82 85 virtual void spawn(); -
code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Spectator.cc
r2087 r2288 169 169 } 170 170 171 void Spectator::fire( )171 void Spectator::fire(WeaponMode::Enum fireMode) 172 172 { 173 173 if (this->getPlayer()) -
code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Spectator.h
r2087 r2288 56 56 virtual void rotateRoll(const Vector2& value); 57 57 58 virtual void fire( );58 virtual void fire(WeaponMode::Enum fireMode); 59 59 virtual void greet(); 60 60
Note: See TracChangeset
for help on using the changeset viewer.