Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

fixed WeaponPack attaching

File:
1 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);   }
Note: See TracChangeset for help on using the changeset viewer.