Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7102 in orxonox.OLD for trunk/src/world_entities/npcs


Ignore:
Timestamp:
Feb 7, 2006, 8:56:57 PM (19 years ago)
Author:
bensch
Message:

power ups can only be picked up once

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

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/npcs/ground_turret.cc

    r7076 r7102  
    6767  this->setHealth(300);
    6868
    69   /*  left = new Turret();
    70   left->setParent(this);
    71   left->setRelCoor(0,10,0);
    72   right = new Turret();
    73   right->setParent(this);
    74   right->setRelCoor(0,10,0);*/
     69  this->weaponHolder[0].addNodeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT);
     70  this->weaponHolder[1].addNodeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT);
     71
     72  this->weaponHolder[0].setRelCoor(0,25,0);
     73  this->weaponHolder[0].setParent(this);
     74  this->weaponHolder[1].setParent(this);
    7575}
    7676
     
    101101    this->left->setRelCoor(0,10,-5);
    102102    this->left->requestAction( WA_ACTIVATE);
     103    this->left->setParent(&this->weaponHolder[0]);
    103104  }
    104105
     
    112113    this->right->setRelCoor(0,10,5);
    113114    this->left->requestAction( WA_ACTIVATE);
     115    this->right->setParent(&this->weaponHolder[0]);
    114116  }
    115117}
  • trunk/src/world_entities/npcs/ground_turret.h

    r7076 r7102  
    3434
    3535 private:
     36   PNode  weaponHolder[2];
    3637   Weapon *left, *right;
    3738};
Note: See TracChangeset for help on using the changeset viewer.