Changeset 9685 in orxonox.OLD for branches/new_class_id/src/world_entities/weapons
- Timestamp:
- Aug 22, 2006, 1:16:23 PM (18 years ago)
- Location:
- branches/new_class_id/src/world_entities/weapons
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/world_entities/weapons/ammo_container.h
r9684 r9685 19 19 20 20 public: 21 AmmoContainer( ClassID projectileType, float maxEnergy = DEFAULT_MAX_ENERGY);21 AmmoContainer(NewClassID id, float maxEnergy = DEFAULT_MAX_ENERGY); 22 22 virtual ~AmmoContainer(); 23 23 24 24 bool operator=(int projectileType) const { return (this->projectileType == projectileType); }; 25 ClassID getProjectileType() const { return this->projectileType; };25 NewClassID getProjectileType() const { return this->projectileType; }; 26 26 27 27 float increaseEnergy(float energy); … … 41 41 float maxEnergy; 42 42 43 ClassID projectileType;43 NewClassID projectileType; 44 44 }; 45 45 -
branches/new_class_id/src/world_entities/weapons/weapon.h
r8976 r9685 87 87 Weapon (); 88 88 virtual ~Weapon (); 89 static Weapon* createWeapon( ClassID weaponID);89 static Weapon* createWeapon(NewClassID weaponID); 90 90 91 91 void init(); … … 110 110 /** @returns the Capabilities of this Weapon */ 111 111 inline long getCapability() const { return this->capability; }; 112 void setProjectileType( ClassID projectile);112 void setProjectileType(NewClassID projectile); 113 113 void setProjectileTypeC(const std::string& projectile); 114 114 /** @returns The projectile's classID */ 115 inline ClassID getProjectileType() { return this->projectile; };115 inline NewClassID getProjectileType() { return this->projectile; }; 116 116 /** @returns the FastFactory, that creates Projectiles of type getProjectile */ 117 117 inline FastFactory* getProjectileFactory() { return this->projectileFactory; }; … … 230 230 bool chargeable; //!< if the Weapon is charcheable (if true, the weapon will charge before it fires.) 231 231 232 ClassID projectile; //!< the projectile used for this weapon (since they should be generated via macro and the FastFactory, only the ClassID must be known.)232 NewClassID projectile; //!< the projectile used for this weapon (since they should be generated via macro and the FastFactory, only the ClassID must be known.) 233 233 FastFactory* projectileFactory; //!< A factory, that produces and handles the projectiles. 234 234 }; -
branches/new_class_id/src/world_entities/weapons/weapon_manager.h
r8844 r9685 89 89 void changeWeaponConfig(int weaponConfig); 90 90 91 float increaseAmmunition( ClassID projectileType, float ammo);91 float increaseAmmunition(NewClassID projectileType, float ammo); 92 92 float inclreaseAmmunition(const Weapon* weapon, float ammo); 93 93 … … 106 106 // private: 107 107 int getNextFreeSlot(int configID, long capability = WTYPE_ALL); 108 CountPointer<AmmoContainer>& getAmmoContainer( ClassID projectileType);108 CountPointer<AmmoContainer>& getAmmoContainer(NewClassID projectileType); 109 109 CountPointer<AmmoContainer>& getAmmoContainer(const Weapon* weapon); 110 110
Note: See TracChangeset
for help on using the changeset viewer.