- Timestamp:
- Apr 10, 2009, 12:05:01 AM (16 years ago)
- Location:
- code/branches/weapons/src/orxonox/objects/worldentities/pawns
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/weapons/src/orxonox/objects/worldentities/pawns/Pawn.cc
r2912 r2914 123 123 if (this->weaponSystem_) 124 124 { 125 for (unsigned int firemode = 0; firemode < WeaponSystem:: getMaxFireModes(); firemode++)126 if (this->fire_ & WeaponSystem::getFire ModeMask(firemode))125 for (unsigned int firemode = 0; firemode < WeaponSystem::MAX_FIRE_MODES; firemode++) 126 if (this->fire_ & WeaponSystem::getFiremodeMask(firemode)) 127 127 this->weaponSystem_->fire(firemode); 128 128 } … … 255 255 void Pawn::fire(unsigned int firemode) 256 256 { 257 this->firehack_ |= WeaponSystem::getFire ModeMask(firemode);257 this->firehack_ |= WeaponSystem::getFiremodeMask(firemode); 258 258 } 259 259 … … 280 280 this->attach(wSlot); 281 281 if (this->weaponSystem_) 282 this->weaponSystem_->a ttachWeaponSlot(wSlot);282 this->weaponSystem_->addWeaponSlot(wSlot); 283 283 } 284 284 … … 291 291 } 292 292 293 void Pawn::addWeaponSet(WeaponSet * wSet) 294 { 295 if (this->weaponSystem_) 296 this->weaponSystem_->addWeaponSet(wSet); 297 } 298 299 WeaponSet * Pawn::getWeaponSet(unsigned int index) const 300 { 301 if (this->weaponSystem_) 302 return this->weaponSystem_->getWeaponSet(index); 303 else 304 return 0; 305 } 306 293 307 void Pawn::addWeaponPack(WeaponPack * wPack) 294 308 { 295 309 if (this->weaponSystem_) 296 this->weaponSystem_->attachWeaponPack(wPack, wPack->getFireMode()); 297 } 298 299 WeaponPack * Pawn::getWeaponPack(unsigned int firemode) const 300 { 301 if (this->weaponSystem_) 302 return this->weaponSystem_->getWeaponPack(firemode); 303 else 304 return 0; 305 } 306 307 void Pawn::addWeaponSet(WeaponSet * wSet) 308 { 309 if (this->weaponSystem_) 310 this->weaponSystem_->attachWeaponSet(wSet); 311 } 312 313 WeaponSet * Pawn::getWeaponSet(unsigned int index) const 314 { 315 if (this->weaponSystem_) 316 return this->weaponSystem_->getWeaponSet(index); 310 this->weaponSystem_->addWeaponPack(wPack); 311 } 312 313 WeaponPack * Pawn::getWeaponPack(unsigned int index) const 314 { 315 if (this->weaponSystem_) 316 return this->weaponSystem_->getWeaponPack(index); 317 317 else 318 318 return 0; -
code/branches/weapons/src/orxonox/objects/worldentities/pawns/Pawn.h
r2912 r2914 85 85 void addWeaponSlot(WeaponSlot * wSlot); 86 86 WeaponSlot * getWeaponSlot(unsigned int index) const; 87 void addWeaponPack(WeaponPack * wPack);88 WeaponPack * getWeaponPack(unsigned int firemode) const;89 87 void addWeaponSet(WeaponSet * wSet); 90 88 WeaponSet * getWeaponSet(unsigned int index) const; 89 void addWeaponPack(WeaponPack * wPack); 90 WeaponPack * getWeaponPack(unsigned int index) const; 91 91 92 92 inline const WorldEntity* getWorldEntity() const
Note: See TracChangeset
for help on using the changeset viewer.