Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 17, 2009, 1:36:21 AM (15 years ago)
Author:
landauf
Message:

delete weaponpacks which were defined in xml but don't fit onto the weaponslots (in the future we could put them into the inventory).

+ some small changes

Location:
code/branches/particles2/src/orxonox/worldentities/pawns
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/particles2/src/orxonox/worldentities/pawns/Pawn.cc

    r5929 r6078  
    110110        XMLPortObject(Pawn, WeaponSlot, "weaponslots", addWeaponSlot, getWeaponSlot, xmlelement, mode);
    111111        XMLPortObject(Pawn, WeaponSet, "weaponsets", addWeaponSet, getWeaponSet, xmlelement, mode);
    112         XMLPortObject(Pawn, WeaponPack, "weapons", addWeaponPack, getWeaponPack, xmlelement, mode);
     112        XMLPortObject(Pawn, WeaponPack, "weapons", addWeaponPackXML, getWeaponPack, xmlelement, mode);
    113113    }
    114114
     
    341341    }
    342342
     343    void Pawn::addWeaponPackXML(WeaponPack * wPack)
     344    {
     345        if (this->weaponSystem_)
     346            if (!this->weaponSystem_->addWeaponPack(wPack))
     347                wPack->destroy();
     348    }
     349
    343350    WeaponPack * Pawn::getWeaponPack(unsigned int index) const
    344351    {
  • code/branches/particles2/src/orxonox/worldentities/pawns/Pawn.h

    r5781 r6078  
    8989            WeaponSet * getWeaponSet(unsigned int index) const;
    9090            void addWeaponPack(WeaponPack * wPack);
     91            void addWeaponPackXML(WeaponPack * wPack);
    9192            WeaponPack * getWeaponPack(unsigned int index) const;
    9293
Note: See TracChangeset for help on using the changeset viewer.