- Timestamp:
- Dec 17, 2008, 2:10:11 AM (15 years ago)
- Location:
- code/branches/presentation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation
- Property svn:mergeinfo changed
/code/branches/weapon2 (added) merged: 2108,2145,2186,2203,2232,2272-2273,2288,2308,2319,2327,2331,2337,2347,2354,2366-2368,2379,2391,2393,2398,2410
- Property svn:mergeinfo changed
-
code/branches/presentation/src/orxonox/objects/weaponSystem/WeaponSlot.cc
r2098 r2493 36 36 37 37 38 39 38 namespace orxonox 40 39 { 41 WeaponSlot::WeaponSlot(BaseObject* creator) : BaseObject(creator) 40 CreateFactory(WeaponSlot); 41 42 WeaponSlot::WeaponSlot(BaseObject* creator) : StaticEntity(creator) 42 43 { 43 44 RegisterObject(WeaponSlot); 44 45 45 46 this->unlimitedAmmo_ = false; 46 47 47 this->attachedWeapon_ = 0; 48 this-> parentWeaponSet_ = 0;48 this->setObjectMode(0x0); 49 49 } 50 50 … … 53 53 } 54 54 55 void WeaponSlot::attachWeapon(Weapon *weaponName)56 {57 58 }59 55 60 56 /*sets the munition type … … 67 63 } 68 64 65 69 66 void WeaponSlot::fire() 70 67 { 68 if ( this->attachedWeapon_ ) 69 //COUT(0) << "WeaponSlot::fire" << std::endl; 70 this->attachedWeapon_->fire(); 71 } 71 72 72 }73 73 74 74 void WeaponSlot::XMLPort(Element& xmlelement, XMLPort::Mode mode) 75 75 { 76 SUPER(WeaponSlot, XMLPort, xmlelement, mode); 77 } 76 78 79 void WeaponSlot::attachWeapon(Weapon *weapon) 80 { 81 this->attachedWeapon_ = weapon; 82 weapon->setAttachedToWeaponSlot(this); 83 //COUT(0) << "WeaponSlot::attachWeapon position=" << this->getWorldPosition() << std::endl; 84 weapon->setPosition(this->getPosition()); 85 } 86 87 Weapon * WeaponSlot::getAttachedWeapon() const 88 { 89 return this->attachedWeapon_; 77 90 } 78 91 }
Note: See TracChangeset
for help on using the changeset viewer.