Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jan 31, 2007, 3:13:28 AM (18 years ago)
Author:
patrick
Message:

mounting weapon slots

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

Legend:

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

    r10440 r10534  
    2323
    2424ObjectListDefinition(WeaponSlot);
     25CREATE_FACTORY(WeaponSlot);
     26
    2527
    2628
     
    5153  LoadParam(root, "WeaponClass", this, WeaponSlot, setWeaponClass)
    5254  .describe("Sets the class this mount points should host");
     55
     56  LoadParam(root, "slot", this, WeaponSlot, setWeaponConfig)
     57      .describe("sets the weapon slot");
    5358}
    5459
  • trunk/src/world_entities/weapons/weapon_slot.h

    r10440 r10534  
    3636  inline void setNextWeapon(Weapon* weapon) { this->nextWeapon = weapon; }
    3737
     38
     39  inline void setWeaponConfig(int slot, int side) { this->weaponSlot = slot; this->weaponSide = side; }
     40  inline int getWeaponSlot() { return this->weaponSlot; }
     41  inline int getWeaponSide() { return this->weaponSide; }
     42
     43
    3844private:
     45
     46  int           weaponSlot;
     47  int           weaponSide;
    3948
    4049  long          capability;             //!< the capabilities of the Slot @see WeaponSlotCapability.
Note: See TracChangeset for help on using the changeset viewer.