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/worldentities/pawns
Files:
2 edited

Legend:

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

    r2087 r2098  
    3535#include "objects/infos/PlayerInfo.h"
    3636#include "objects/gametypes/Gametype.h"
     37#include "objects/WeaponSystem.h"
    3738
    3839namespace orxonox
     
    5152
    5253        this->lastHitOriginator_ = 0;
     54        this->weaponSystem_ = 0;
     55
     56        /*
     57        //WeaponSystem
     58        weaponSystem_ = new WeaponSystem();
     59        WeaponSet * weaponSet1 = new WeaponSet(1);
     60        this->weaponSystem_->attachWeaponSet(weaponSet1);
     61        this->weaponSystem_->getWeaponSetPointer(0)->getWeaponSlotPointer(0)->setAmmoType(true);
     62        */
    5363
    5464        this->registerVariables();
     
    127137    }
    128138
     139    void Pawn::fire()
     140    {
     141        if (this->weaponSystem_)
     142            this->weaponSystem_->fire();
     143    }
     144
    129145    void Pawn::postSpawn()
    130146    {
  • code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.h

    r2087 r2098  
    7474            virtual void kill();
    7575
     76            virtual void fire();
     77
    7678            virtual void postSpawn();
    7779
     
    8789
    8890            Pawn* lastHitOriginator_;
     91
     92            WeaponSystem* weaponSystem_;
    8993    };
    9094}
Note: See TracChangeset for help on using the changeset viewer.