Changeset 11170 for code/branches/sagerjFS16/src/orxonox
- Timestamp:
- Apr 21, 2016, 3:33:48 PM (9 years ago)
- Location:
- code/branches/sagerjFS16/src/orxonox
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/sagerjFS16/src/orxonox/controllers/HumanController.cc
r11166 r11170 159 159 void HumanController::fire(unsigned int firemode) 160 160 { 161 orxout() << "fire hc " << firemode << endl;162 161 if (HumanController::localController_s) 163 162 HumanController::localController_s->doFire(firemode); … … 166 165 void HumanController::doFire(unsigned int firemode) 167 166 { 168 orxout() << "do fire hc " << firemode << endl;169 167 if (HumanController::localController_s && HumanController::localController_s->controllableEntity_) 170 168 { … … 180 178 void HumanController::release(unsigned int firemode) 181 179 { 182 orxout() << "release hc " << firemode << endl;183 180 if (HumanController::localController_s) 184 181 HumanController::localController_s->doRelease(firemode); … … 187 184 void HumanController::doRelease(unsigned int firemode) 188 185 { 189 orxout() << "do release hc " << firemode << endl;190 186 if (HumanController::localController_s && HumanController::localController_s->controllableEntity_) 191 187 { -
code/branches/sagerjFS16/src/orxonox/controllers/NewHumanController.cc
r11166 r11170 285 285 if (firemode == 1 && this->controlMode_ == 1) 286 286 { 287 orxout() << "do fire nhc if " << firemode << endl;288 287 //unlocked steering, steer on right mouse click 289 288 HumanController::yaw(Vector2(this->currentYaw_, 0)); … … 292 291 else 293 292 { 294 orxout() << "do fire nhc else " << firemode << endl;295 293 HumanController::doFire(firemode); //call for formationflight 296 294 } … … 299 297 void NewHumanController::doRelease(unsigned int firemode) 300 298 { 301 orxout() << "do release nhc" << firemode << endl;302 299 if (!this->controllableEntity_) 303 300 return; -
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) -
code/branches/sagerjFS16/src/orxonox/worldentities/ControllableEntity.cc
r11166 r11170 303 303 if(GameMode::isMaster()) 304 304 { 305 orxout() << "fire ce if " << firemode << endl;306 305 this->fired(firemode); 307 306 } 308 307 else 309 308 { 310 orxout() << "fire ce else " << firemode << endl;311 309 callMemberNetworkFunction(&ControllableEntity::fire, this->getObjectID(), 0, firemode); 312 310 } … … 317 315 if(GameMode::isMaster()) 318 316 { 319 orxout() << "release ce if " << firemode << endl;320 317 this->released(firemode); 321 318 } 322 319 else 323 320 { 324 orxout() << "release ce else " << firemode << endl;325 321 callMemberNetworkFunction(&ControllableEntity::fire, this->getObjectID(), 0, firemode); 326 322 } -
code/branches/sagerjFS16/src/orxonox/worldentities/pawns/Pawn.cc
r11166 r11170 430 430 void Pawn::fired(unsigned int firemode) 431 431 { 432 orxout() << "fired pawn " << firemode << endl;433 432 if (this->weaponSystem_) 434 433 this->weaponSystem_->fire(firemode); … … 437 436 void Pawn::released(unsigned int firemode) 438 437 { 439 orxout() << "released pawn " << firemode << endl;440 438 if (this->weaponSystem_) 441 439 this->weaponSystem_->release(firemode);
Note: See TracChangeset
for help on using the changeset viewer.