Changeset 11170 for code/branches/sagerjFS16/src/orxonox/weaponsystem
- Timestamp:
- Apr 21, 2016, 3:33:48 PM (9 years ago)
- Location:
- code/branches/sagerjFS16/src/orxonox/weaponsystem
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/sagerjFS16/src/orxonox/weaponsystem/Weapon.cc
r11166 r11170 114 114 // Note: The reloading of each WeaponMode is internally handled by each A, B and C. 115 115 // The reloading of the weapon is only performed to avoid firing with different modes at the same time. 116 orxout() << "fire weapon " << mode << endl; 116 117 117 118 if (this->bReloading_ && this->reloadingWeaponmode_ != mode) 118 119 return; … … 137 138 void Weapon::release(unsigned int mode) 138 139 { 139 orxout() << "release weapon " << mode << endl;140 140 if (this->bReloading_ && this->reloadingWeaponmode_ != mode) 141 141 return; -
code/branches/sagerjFS16/src/orxonox/weaponsystem/WeaponMode.cc
r11166 r11170 121 121 { 122 122 (*reloadTime) = this->reloadTime_; 123 orxout() << "fire wm " << reloadTime << endl;124 123 // Fireing is only possible if this weapon mode is not reloading and there is enough munition 125 124 if (!this->bReloading_ && this->munition_ && this->munition_->takeMunition(this->munitionPerShot_, this)) … … 171 170 bool WeaponMode::release(float* reloadTime) 172 171 { 173 orxout() << "release wm " << reloadTime << endl;172 this->release(); 174 173 return false; 175 174 } -
code/branches/sagerjFS16/src/orxonox/weaponsystem/WeaponMode.h
r11166 r11170 165 165 166 166 virtual void fire() = 0; 167 virtual void release() {}; 167 168 168 169 unsigned int initialMunition_; -
code/branches/sagerjFS16/src/orxonox/weaponsystem/WeaponPack.cc
r11166 r11170 76 76 void WeaponPack::fire(unsigned int weaponmode) 77 77 { 78 orxout() << "fire wp " << weaponmode << endl;79 78 for (Weapon* weapon : this->weapons_) 80 79 weapon->fire(weaponmode); … … 83 82 void WeaponPack::release(unsigned int weaponmode) 84 83 { 85 orxout() << "release wp " << weaponmode << endl;86 84 for (Weapon* weapon : this->weapons_) 87 85 weapon->release(weaponmode); -
code/branches/sagerjFS16/src/orxonox/weaponsystem/WeaponSet.cc
r11166 r11170 63 63 { 64 64 // Fire all WeaponPacks with their defined weaponmode 65 orxout() << "fire wset " << endl;66 65 for (const auto& mapEntry : this->weaponpacks_) 67 66 if (mapEntry.second != WeaponSystem::WEAPON_MODE_UNASSIGNED) … … 72 71 { 73 72 // Fire all WeaponPacks with their defined weaponmode 74 orxout() << "release wset " << endl;75 73 for (const auto& mapEntry : this->weaponpacks_) 76 74 if (mapEntry.second != WeaponSystem::WEAPON_MODE_UNASSIGNED) -
code/branches/sagerjFS16/src/orxonox/weaponsystem/WeaponSystem.cc
r11166 r11170 289 289 void WeaponSystem::fire(unsigned int firemode) 290 290 { 291 orxout() << "fire wsys " << firemode << endl;292 291 std::map<unsigned int, WeaponSet *>::iterator it = this->weaponSets_.find(firemode); 293 292 if (it != this->weaponSets_.end() && it->second) … … 297 296 void WeaponSystem::release(unsigned int firemode) 298 297 { 299 orxout() << "release wsys " << firemode << endl;300 298 std::map<unsigned int, WeaponSet *>::iterator it = this->weaponSets_.find(firemode); 301 299 if (it != this->weaponSets_.end() && it->second)
Note: See TracChangeset
for help on using the changeset viewer.