Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 1, 2008, 11:17:22 PM (16 years ago)
Author:
landauf
Message:
  • added a WeaponSystem to Pawn
  • initialized values in weapon classes and fixed some vector limit conditions
Location:
code/trunk/src/orxonox/objects/weaponSystem
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/weaponSystem/Weapon.cc

    r2097 r2098  
    4040    {
    4141        RegisterObject(Weapon);
     42
     43        this->loadingTime_ = 0;
     44        this->munition_ = 0;
     45
    4246    }
    4347
  • code/trunk/src/orxonox/objects/weaponSystem/Weapon.h

    r2097 r2098  
    4949
    5050        private:
    51             int loadingTime;
     51            int loadingTime_;
    5252            Munition *munition_;
    5353
  • code/trunk/src/orxonox/objects/weaponSystem/WeaponSet.cc

    r2097 r2098  
    4242        RegisterObject(WeaponSet);
    4343
     44        this->parentWeaponSystem_ = 0;
     45
    4446        for (int i=0;i<k;i++)
    4547        {
     
    6870    }
    6971
    70     WeaponSlot * WeaponSet::getWeaponSlotPointer(int n)
     72    WeaponSlot * WeaponSet::getWeaponSlotPointer(unsigned int n)
    7173    {
    72         return this->weaponSlots_[n];
     74        if (n < this->weaponSlots_.size())
     75            return this->weaponSlots_[n];
     76        else
     77            return 0;
    7378    }
    7479
  • code/trunk/src/orxonox/objects/weaponSystem/WeaponSet.h

    r2097 r2098  
    5050            void WeaponSet::attachWeaponSlot(WeaponSlot *wSlot);
    5151            void WeaponSet::fire();
    52             WeaponSlot * getWeaponSlotPointer(int n);
     52            WeaponSlot * getWeaponSlotPointer(unsigned int n);
    5353
    5454            inline void WeaponSet::setParentWeaponSystem(WeaponSystem *parentWeaponSystem)
  • code/trunk/src/orxonox/objects/weaponSystem/WeaponSlot.cc

    r2097 r2098  
    4242    {
    4343        RegisterObject(WeaponSlot);
     44
     45        this->unlimitedAmmo_ = false;
     46
     47        this->attachedWeapon_ = 0;
     48        this->parentWeaponSet_ = 0;
    4449    }
    4550
  • code/trunk/src/orxonox/objects/weaponSystem/weapons/LaserGun.h

    r2097 r2098  
    3535
    3636#include "LaserGunMunition.h"
    37 #include "../tools/BillboardSet.h"
     37#include "tools/BillboardSet.h"
     38#include "util/Math.h"
    3839
    3940namespace orxonox
  • code/trunk/src/orxonox/objects/weaponSystem/weapons/Missile.h

    r2097 r2098  
    3232#include "OrxonoxPrereqs.h"
    3333
    34 #include "core/BaseObject.h"
     34#include "objects/weaponSystem/Weapon.h"
    3535
    3636
    3737namespace orxonox
    3838{
    39     class _OrxonoxExport Missile : public BaseObject : public Weapon
     39    class _OrxonoxExport Missile : public Weapon
    4040    {
    4141        public:
Note: See TracChangeset for help on using the changeset viewer.