Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 3, 2008, 3:11:48 PM (16 years ago)
Author:
polakma
Message:

fixed WeaponPack attaching

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

Legend:

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

    r2308 r2319  
    7878        XMLPortObject(Pawn, WeaponSlot, "weaponslots", setWeaponSlot, getWeaponSlot, xmlelement, mode);
    7979        XMLPortObject(Pawn, WeaponSet, "weaponsets", setWeaponSet, getWeaponSet, xmlelement, mode);
    80         //XMLPortObject(Pawn, WeaponPack, "weapons", setWeaponPack, getWeaponPack, xmlelement, mode);
     80        XMLPortObject(Pawn, WeaponPack, "weapons", setWeaponPack, getWeaponPack, xmlelement, mode);
    8181
    8282        }
     
    155155
    156156
     157
    157158    void Pawn::setWeaponSlot(WeaponSlot * wSlot)
    158159    {   this->weaponSystem_->attachWeaponSlot(wSlot);   }
    159160    WeaponSlot * Pawn::getWeaponSlot(unsigned int index) const
    160161    {   return this->weaponSystem_->getWeaponSlotPointer(index);    }
    161 
    162     /*
     162   
    163163    void Pawn::setWeaponPack(WeaponPack * wPack)
    164     {   this->weaponSystem_->attachWeaponPack(wPack);   }
    165     WeaponPack * Pawn::getWeaponPack(unsigned int index) const
    166     {   return this->weaponSystem_->getWeaponPackPointer(index);
    167     */
    168 
     164    {   this->weaponSystem_->attachWeaponPack( wPack,wPack->getFireMode() );   }
     165    WeaponPack * Pawn::getWeaponPack(unsigned int firemode) const
     166    {   return this->weaponSystem_->getWeaponPackPointer(firemode);    }
     167   
    169168    void Pawn::setWeaponSet(WeaponSet * wSet)
    170169    {   this->weaponSystem_->attachWeaponSet(wSet);   }
  • code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Pawn.h

    r2308 r2319  
    8181            void setWeaponSlot(WeaponSlot * wSlot);
    8282            WeaponSlot * getWeaponSlot(unsigned int index) const;
    83          //   void setWeaponPack(WeaponPack * wPack);
    84          //   WeaponPack * getWeaponPack(unsigned int index) const;
     83            void setWeaponPack(WeaponPack * wPack);
     84            WeaponPack * getWeaponPack(unsigned int firemode) const;
    8585            void setWeaponSet(WeaponSet * wSet);
    8686            WeaponSet * getWeaponSet(unsigned int index) const;
Note: See TracChangeset for help on using the changeset viewer.