Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 10, 2009, 12:05:01 AM (16 years ago)
Author:
landauf
Message:

More changes in the WeaponSystem:

  • WeaponSets can now contain several WeaponPacks
  • WeaponPacks can now belong to several WeaponSets

(until now this seemingly was a 1:1 relationship… now it's n:m)

  • Started support for multiple weaponmodes
  • Added some code to the destructor of some classes… according to some legends, this helps destroying objects. (WeaponSets and WeaponPacks weren't deleted before…)

Not yet finished, but I have to synchronize desktop computer and notebook.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/weapons/src/orxonox/objects/weaponSystem/Weapon.h

    r2912 r2914  
    8686                { return this->weaponSystem_; };
    8787
    88             inline void setAttachedToWeaponSlot(WeaponSlot * wSlot)
    89                 { this->attachedToWeaponSlot_ = wSlot; }
    90             inline WeaponSlot * getAttachedToWeaponSlot() const
    91                 { return this->attachedToWeaponSlot_; }
     88            inline void setWeaponPack(WeaponPack *weaponPack)
     89                { this->weaponPack_ = weaponPack; };
     90            inline WeaponPack * getWeaponPack() const
     91                { return this->weaponPack_; };
     92
     93            inline void setWeaponSlot(WeaponSlot * wSlot)
     94                { this->weaponSlot_ = wSlot; }
     95            inline WeaponSlot * getWeaponSlot() const
     96                { return this->weaponSlot_; }
    9297
    9398        protected:
     
    102107            std::string munitionType_;
    103108
    104             WeaponSlot * attachedToWeaponSlot_;
     109            WeaponSlot * weaponSlot_;
    105110            Munition * munition_;
    106111            WeaponSystem * weaponSystem_;
     112            WeaponPack* weaponPack_;
    107113
    108114            SubclassIdentifier<Munition> munitionIdentifier_;
Note: See TracChangeset for help on using the changeset viewer.