- Timestamp:
- Apr 18, 2009, 6:14:52 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/weapons/src/orxonox/objects/weaponSystem/WeaponPack.cc
r2915 r2918 72 72 SUPER(WeaponPack, XMLPort, xmlelement, mode); 73 73 74 XMLPortObject (WeaponPack, Weapon, "", addWeapon, getWeapon, xmlelement, mode);74 XMLPortObjectExtended(WeaponPack, Weapon, "", addWeapon, getWeapon, xmlelement, mode, false, false); 75 75 XMLPortObject(WeaponPack, DefaultWeaponmodeLink, "links", addDefaultWeaponmodeLink, getDefaultWeaponmodeLink, xmlelement, mode); 76 76 } … … 79 79 { 80 80 for (std::set<Weapon *>::iterator it = this->weapons_.begin(); it != this->weapons_.end(); ++it) 81 (*it)->fire(); 81 (*it)->fire(weaponmode); 82 } 83 84 void WeaponPack::reload() 85 { 86 for (std::set<Weapon *>::iterator it = this->weapons_.begin(); it != this->weapons_.end(); ++it) 87 (*it)->reload(); 82 88 } 83 89 … … 114 120 } 115 121 116 void WeaponPack::setWeaponSystemToAllWeapons()117 {118 for (std::set<Weapon *>::const_iterator it = this->weapons_.begin(); it != this->weapons_.end(); ++it)119 (*it)->setWeaponSystem(this->weaponSystem_);120 }121 122 void WeaponPack::attachNeededMunitionToAllWeapons()123 {124 for (std::set<Weapon *>::const_iterator it = this->weapons_.begin(); it != this->weapons_.end(); ++it)125 {126 (*it)->attachNeededMunition((*it)->getMunitionType());127 (*it)->setWeapon();128 }129 }130 131 122 void WeaponPack::addDefaultWeaponmodeLink(DefaultWeaponmodeLink* link) 132 123 { … … 155 146 return WeaponSystem::WEAPON_MODE_UNASSIGNED; 156 147 } 148 149 void WeaponPack::notifyWeapons() 150 { 151 for (std::set<Weapon *>::const_iterator it = this->weapons_.begin(); it != this->weapons_.end(); ++it) 152 (*it)->setWeaponPack(this); 153 } 157 154 }
Note: See TracChangeset
for help on using the changeset viewer.