Changeset 10684 in orxonox.OLD for branches/vs-enhencements/src/world_entities
- Timestamp:
- Jun 11, 2007, 11:30:56 AM (18 years ago)
- Location:
- branches/vs-enhencements/src/world_entities
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/vs-enhencements/src/world_entities/npcs/npc.cc
r10678 r10684 167 167 // this->getWeaponManager().changeWeaponConfig(1); 168 168 169 this->setHealthMax(100); 170 this->setHealth(80); 169 // this->setHealthMax(100); 170 // this->setHealth(80); 171 this->loadHealth(80,100); 171 172 172 173 this->getWeaponManager().setSlotCount(7); -
branches/vs-enhencements/src/world_entities/space_ships/space_ship.cc
r10678 r10684 175 175 176 176 177 //this->weaponMan.addWeaponToSlot(0, 0, "RFCannon");178 //this->weaponMan.addWeaponToSlot(0, 1, "RFCannon");179 //this->weaponMan.addWeaponToSlot(0, 2, "RFCannon");180 //this->weaponMan.addWeaponToSlot(0, 3, "RFCannon");181 //this->weaponMan.addWeaponToSlot(1, 0, "RFCannon");182 //this->weaponMan.addWeaponToSlot(1, 1, "RFCannon");183 //this->weaponMan.addWeaponToSlot(1, 2, "RFCannon");184 //this->weaponMan.addWeaponToSlot(1, 3, "RFCannon");177 this->weaponMan.addWeaponToSlot(0, 0, "RFCannon"); 178 this->weaponMan.addWeaponToSlot(0, 1, "RFCannon"); 179 this->weaponMan.addWeaponToSlot(0, 2, "RFCannon"); 180 this->weaponMan.addWeaponToSlot(0, 3, "RFCannon"); 181 this->weaponMan.addWeaponToSlot(1, 0, "RFCannon"); 182 this->weaponMan.addWeaponToSlot(1, 1, "RFCannon"); 183 this->weaponMan.addWeaponToSlot(1, 2, "RFCannon"); 184 this->weaponMan.addWeaponToSlot(1, 3, "RFCannon"); 185 185 186 186 this->weaponMan.addWeaponToSlot(0, 4, "NadionLaser"); … … 462 462 { 463 463 int slot = ws->getWeaponSlot(); 464 //int side = ws->getWeaponSide(); //FIXME / REMOVE: is not used// HACK needed for some weapons (left/right)464 int side = ws->getWeaponSide(); //FIXME / REMOVE: is not used// HACK needed for some weapons (left/right) 465 465 this->getWeaponManager().setSlotPosition(slot, (*it).second->getCenter()); 466 466 this->getWeaponManager().setSlotDirection(slot, ws->getRelDir()); -
branches/vs-enhencements/src/world_entities/weapons/weapon.cc
r10648 r10684 145 145 146 146 this->hideInactive = true; //< The Weapon will be hidden if it is inactive (by default) 147 this->currentState = WS_INACTIVE; 147 148 148 149 this->minCharge = 1.0; //< The minimum charge the Weapon can hold is 1 unit. -
branches/vs-enhencements/src/world_entities/weapons/weapon_slot.h
r10678 r10684 43 43 inline void addWeapon(const std::string& weaponName, int config) {this->configs[config] = Weapon::createWeapon(weaponName); } 44 44 inline void setWeapon(Weapon* weapon, int config) {this->configs[config] = weapon; }; 45 inline Weapon* getWeapon(int config) { if (config > WM_MAX_CONFIGS ) return NULL; return this->configs[config]; };45 inline Weapon* getWeapon(int config) { if (config > WM_MAX_CONFIGS || config < 0) return NULL; return this->configs[config]; }; 46 46 47 47 inline void setWeaponConfig(int slot, int side) { this->weaponSlot = slot; this->weaponSide = side; }
Note: See TracChangeset
for help on using the changeset viewer.