Changeset 232 for code/branches/main_reto_vs05/src/orxonox_ship.cc
- Timestamp:
- Nov 21, 2007, 12:44:02 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/main_reto_vs05/src/orxonox_ship.cc
r198 r232 34 34 35 35 #include "inertial_node.h" 36 #include "run_manager.h" 36 37 #include "weapon/bullet.h" 37 38 #include "weapon/bullet_manager.h" 38 39 #include "weapon/weapon_station.h" 39 40 #include "weapon/base_weapon.h" 41 #include "weapon/barrel_gun.h" 40 42 #include "weapon/ammunition_dump.h" 41 43 … … 68 70 * @param mNode The scene node which the ship will be attached to later. 69 71 */ 70 OrxonoxShip::OrxonoxShip(SceneManager *sceneMgr, SceneNode *node, 71 BulletManager *bulletManager) 72 : sceneMgr_(sceneMgr), 73 baseThrust_(1000), currentThrust_(Vector3::ZERO), 74 objectCounter_(0), bulletManager_(bulletManager) 72 OrxonoxShip::OrxonoxShip(SceneNode *node) 73 : sceneMgr_(RunManager::getSingletonPtr()->getSceneManagerPtr()), 74 bulletManager_(RunManager::getSingletonPtr()->getBulletManagerPtr()), 75 baseThrust_(1000), currentThrust_(Vector3::ZERO), objectCounter_(0) 75 76 { 76 77 rootNode_ = new InertialNode(node, Vector3::ZERO); … … 115 116 116 117 // initialise weapon(s) 117 ammoDump_ = new AmmunitionDump(420); 118 ammoDump_->store(420); 118 ammoDump_ = new AmmunitionDump(); 119 ammoDump_->setDumpSize("Barrel", 1000); 120 ammoDump_->store("Barrel", 420); 119 121 120 122 InertialNode *mainWeaponNode = rootNode_->createChildNode(); 121 mainWeapon_ = new BaseWeapon(sceneMgr_, mainWeaponNode, 122 bulletManager_, ammoDump_); 123 mainWeapon_ = new BarrelGun(mainWeaponNode, ammoDump_); 123 124 124 125 railGunStation_ = new WeaponStation(4); … … 216 217 int OrxonoxShip::getAmmoStock() 217 218 { 218 return ammoDump_->getStockSize( );219 return ammoDump_->getStockSize("Barrel"); 219 220 } 220 221
Note: See TracChangeset
for help on using the changeset viewer.