Changeset 6265 for code/branches/presentation2
- Timestamp:
- Dec 7, 2009, 2:23:46 PM (15 years ago)
- Location:
- code/branches/presentation2/src/orxonox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/orxonox/sound/SoundManager.cc
r6256 r6265 154 154 { 155 155 this->processCrossFading(time.getDeltaTime()); 156 alcProcessContext(this->context_); 156 157 } 157 158 -
code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.cc
r6245 r6265 39 39 #include "WeaponPack.h" 40 40 #include "WeaponSystem.h" 41 #include "WeaponSlot.h" 41 42 42 43 #include "sound/WorldSound.h" … … 72 73 this->defSndWpnFire_ = new WorldSound(this); 73 74 this->defSndWpnFire_->setLooping(false); 75 this->bSoundAttached_ = false; 74 76 } 75 77 … … 104 106 { 105 107 (*reloadTime) = this->reloadTime_; 108 if( !this->bSoundAttached_ ) 109 { 110 assert(this->getWeapon() && this->getWeapon()->getWeaponSlot()); 111 this->getWeapon()->getWeaponSlot()->attach(this->defSndWpnFire_); 112 this->bSoundAttached_ = true; 113 } 106 114 107 115 if (!this->bReloading_ && this->munition_ && this->munition_->takeMunition(this->munitionPerShot_, this)) … … 122 130 this->reloadTimer_.startTimer(); 123 131 124 assert( this->getWeapon() && this->getWeapon()->getWeaponPack() && this->getWeapon()->getWeaponPack()->getWeaponSystem() && this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn() );125 this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->attach(this->defSndWpnFire_);126 132 if(!(this->defSndWpnFire_->isPlaying())) 127 133 { -
code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.h
r6245 r6265 166 166 167 167 WorldSound* defSndWpnFire_; 168 bool bSoundAttached_; 168 169 }; 169 170 }
Note: See TracChangeset
for help on using the changeset viewer.