Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10648


Ignore:
Timestamp:
Oct 12, 2015, 6:28:15 PM (8 years ago)
Author:
fvultier
Message:

Removed EnergyDrink Weapon from SpaceshipASSFF. Improved documentation of the WeaponSlot class.

Location:
code/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/data/levels/includes/weaponSettingsAssff.oxi

    r10622 r10648  
    2525          </attached>
    2626          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
    27           <EnergyDrink mode=0 munitionpershot=0 delay=0  material="Flares/point_lensflare" muzzleoffset="2,-0.2,-1" />
    2827          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
    2928          <LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20 />
     
    4443        </Weapon>
    4544      </WeaponPack>
    46       <WeaponPack>
    47         <links>
    48           <DefaultWeaponmodeLink firemode=1 weaponmode=0 />
    49         </links>
    50         <!--Weapon>
    51           <EnergyDrink mode=0 munitionpershot=0 delay=0  material="Flares/point_lensflare"muzzleoffset="2,-0.2,-1" />
    52         </Weapon-->
    53       </WeaponPack>
    5445    </weapons>
  • code/trunk/data/levels/includes/weaponSettingsAssff2.oxi

    r8706 r10648  
    4545        </Weapon>
    4646      </WeaponPack>
    47       <WeaponPack>
    48         <links>
    49           <DefaultWeaponmodeLink firemode=1 weaponmode=0 />
    50         </links>
    51         <!--Weapon>
    52           <EnergyDrink mode=0 munitionpershot=0 delay=0  material="Flares/point_lensflare"muzzleoffset="2,-0.2,-1" />
    53         </Weapon-->
    54       </WeaponPack>
    5547    </weapons>
  • code/trunk/src/orxonox/weaponsystem/WeaponSlot.cc

    r9667 r10648  
    6262    }
    6363
     64    /**
     65    @brief
     66        Attaches the passed Weapon to this WeaponSlot. If this WeaponSlot is already occupied the old Weapon is removed and replaced by the new one.
     67    */
    6468    void WeaponSlot::attachWeapon(Weapon *weapon)
    6569    {
     
    7680    }
    7781
     82    /**
     83    @brief
     84        Removes the attached weapon if there is any.
     85    */
    7886    void WeaponSlot::removeWeapon()
    7987    {
  • code/trunk/src/orxonox/weaponsystem/WeaponSlot.h

    r9667 r10648  
    3535namespace orxonox
    3636{
    37         /**
    38         @brief
    39             The a WeaponSlot defines where a @ref orxonox::Weapon "Weapon" is placed on a pawn. (A WeaponSlot is a StaticEntity)
    40             In a WeaponSlot there can be only one "Weapon", but a Weapon can have several @ref orxonox::WeaponMode "WeaponModes".
    41             A WeaponMode is what one intuitively imagines as weapon. (E.g. RocketFire, LightningGun, LaserFire are weaponmodes)
     37    /**
     38    @brief
     39        The a WeaponSlot defines where a @ref orxonox::Weapon "Weapon" is placed on a pawn. (A WeaponSlot is a StaticEntity)
     40        In a WeaponSlot there can be only one "Weapon", but a Weapon can have several @ref orxonox::WeaponMode "WeaponModes".
     41        A WeaponMode is what one intuitively imagines as weapon. (E.g. RocketFire, LightningGun, LaserFire are weaponmodes)
    4242
    43             A WeaponSlot is created in XML (in a weaponsettings file), which can be done in the following fashion:
    44             @code
    45             <weaponslots>
    46               <WeaponSlot position="-15.0,-1.5,0" />
    47               <WeaponSlot position=" 15.0,-1.5,0" />
    48               <WeaponSlot position="    0,   0,0" />
    49             </weaponslots>
     43        A WeaponSlot is created in XML (in a weaponsettings file), which can be done in the following fashion:
     44        @code
     45        <weaponslots>
     46          <WeaponSlot position="-15.0,-1.5,0" />
     47          <WeaponSlot position=" 15.0,-1.5,0" />
     48          <WeaponSlot position="    0,   0,0" />
     49        </weaponslots>
    5050
    51         @author
    52             Martin Polak
     51        A WeaponSlot can be attached to a @ref orxonox::Pawn because WeaponSlot inherits from @ref orxonox::StaticEntity.
    5352
    54         @ingroup Weaponsystem
     53    @author
     54        Martin Polak
     55
     56    @ingroup Weaponsystem
    5557    */
    5658    class _OrxonoxExport WeaponSlot : public StaticEntity
     
    6769                { return this->weapon_; }
    6870
     71            /**
     72            @brief
     73                Checks whether there is a Weapon attached to this WeaponSlot.
     74            */
    6975            inline bool isOccupied() const
    7076                { return (this->weapon_ != 0); }
     
    7783
    7884        private:
    79             WeaponSystem * weaponSystem_;
    80             Weapon * weapon_;
     85            WeaponSystem * weaponSystem_; // Pointer to the WeaponSystem
     86            Weapon * weapon_; // If the WeaponSlot is occupied a pointer to the attached Weapon is stored here.
    8187    };
    8288}
Note: See TracChangeset for help on using the changeset viewer.