Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6803 in orxonox.OLD for trunk/src/world_entities/weapons


Ignore:
Timestamp:
Jan 28, 2006, 11:14:40 AM (19 years ago)
Author:
bensch
Message:

trunk: WeaponManager fix

Location:
trunk/src/world_entities/weapons
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/weapons/cannon.cc

    r6799 r6803  
    7474//  this->model = (Model*)ResourceManager::getInstance()->load("models/guns/test_gun.obj", OBJ, RP_CAMPAIGN);
    7575
    76   this->loadModel("models/guns/plasmadriver_#.obj");
     76  this->loadModel("models/guns/plasmadriver_#.obj", 2.0);
    7777
    7878  this->setStateDuration(WS_SHOOTING, 2.0);
     
    8888  this->setActionSound(WA_ACTIVATE, "sound/voices/cannon.wav");
    8989
    90   this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
     90  this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL | WTYPE_HEAVY);
    9191  this->setProjectileType(CL_BOMB);
    9292  this->prepareProjectiles(5);
  • trunk/src/world_entities/weapons/weapon.h

    r6756 r6803  
    6060  WTYPE_DIRECTIONAL   = 0x00000001,           //!< Weapon is directional/Slot is able to carry directional weapons
    6161  WTYPE_TURRET        = 0x00000002,           //!< Weapon is a turret/slot is able to carry turrets
     62  WTYPE_LIGHT         = 0x00000004,           //!< For light Armament.
     63  WTYPE_HEAVY         = 0x00000008,           //!< The heavy Armament (Cannons).
    6264  WTYPE_ALLKINDS      = 0x0000000f,           //!< Weapon is all types/Slot is able to carry all kinds of weapons
    6365
  • trunk/src/world_entities/weapons/weapon_manager.cc

    r6778 r6803  
    185185 * @param position the position of the given slot
    186186 */
    187 void WeaponManager::setSlotPosition(int slot, const Vector& position)
     187void WeaponManager::setSlotPosition(int slot, const Vector& position, PNode* parent)
    188188{
    189189  if (slot < this->slotCount)
     190  {
    190191    this->currentSlotConfig[slot].position.setRelCoor(position);
     192
     193    if (parent != NULL)
     194      this->currentSlotConfig[slot].position.setParent(parent);
     195  }
    191196}
    192197
  • trunk/src/world_entities/weapons/weapon_manager.h

    r6679 r6803  
    6262    unsigned int getSlotCount() const { return this->slotCount; };
    6363    // setting up the WeaponManager with the following functions
    64     void setSlotPosition(int slot, const Vector& position);
     64    void setSlotPosition(int slot, const Vector& position, PNode* parent = NULL);
    6565    void setSlotDirection(int slot, const Quaternion& rotation);
    6666    /** @param slot the slot to get the relative position from @returns the relative position of the Carrier to the Slot */
Note: See TracChangeset for help on using the changeset viewer.