Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 1, 2008, 11:17:22 PM (15 years ago)
Author:
landauf
Message:
  • added a WeaponSystem to Pawn
  • initialized values in weapon classes and fixed some vector limit conditions
File:
1 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    {
Note: See TracChangeset for help on using the changeset viewer.