- Timestamp:
- Nov 12, 2008, 12:50:18 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/weapon2/src/orxonox/objects/weaponSystem/Weapon.cc
r2145 r2186 42 42 RegisterObject(Weapon); 43 43 this->weaponReadyToShoot_ = true; 44 //this->setParentWeaponSystem(); 44 this->setParentWeaponSystem(); 45 this->pointerToMunition_ = this->parentWeaponSystem_->getAttachedMunitionPointer; 46 this->attachNeededMunition(this->pointerToMunition_); 45 47 46 48 } … … 66 68 } 67 69 68 void Weapon::attachNeededMunition(Munition *PointerToMunition)70 void attachNeededMunition(Munition *pointerToMunition) 69 71 { 72 //if munition type already exist attach it, else create a new one of this type and attach it to the weapon and to the WeaponSystem 73 if ( this->parentWeaponSystem_->munitionSet_[laserGunMunition] ) 74 this->pointerToMunition_ = pointerToMunition; 75 else 76 { 77 this->pointerToMunition_ = new LaserGunMunition; 78 this->parentWeaponSystem_->munitionSet_[laserGunMunition] = this->pointerToMunition_; 70 79 80 } 71 81 } 82 72 83 /* 73 84 void Weapon::setParentWeaponSystem()
Note: See TracChangeset
for help on using the changeset viewer.