Changeset 10443 in orxonox.OLD for trunk/src/world_entities/weapons
- Timestamp:
- Jan 28, 2007, 3:06:13 PM (18 years ago)
- Location:
- trunk/src/world_entities/weapons
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/weapons/weapon.cc
r10368 r10443 124 124 this->segs = 1; 125 125 126 this->preferedSide = -1; 127 this->preferedSlot = -1; 128 126 129 this->shootAnim = new Animation3D**[this->getBarrels()]; 127 130 for (int i = 0; i < this->getBarrels(); i++) … … 159 162 * needed, if there are more than one barrel or segments 160 163 */ 161 void Weapon::init2() 164 void Weapon::init2() 162 165 { 163 166 if (this->barrels == 1 && this->segs == 1) … … 206 209 LoadParam(root, "projectile", this, Weapon, setProjectileTypeC) 207 210 .describe("Sets the name of the Projectile to load onto the Entity"); 211 212 LoadParam(root, "energy", this, Weapon, setEnergyMax) 213 .describe("number of shoots/ energy whatever"); 214 215 LoadParam(root, "slot", this, Weapon, setPreferedSlot) 216 .describe("slot this weapon will be added"); 208 217 /* 209 218 LoadParam(root, "emission-point", this, Weapon, setEmissionPoint) … … 463 472 return energyToAdd - maxAddEnergy; 464 473 } 465 474 466 475 } 467 476 -
trunk/src/world_entities/weapons/weapon.h
r10368 r10443 187 187 void deconstr(); 188 188 189 inline int getPreferedSide() { return this->preferedSide; } 190 inline int getPreferedSlot() { return this->preferedSlot; } 191 192 189 193 protected: 190 194 //! ACTION: these functions are handled by the Weapon itself, and must be called by requestAction(WeaponAction); … … 202 206 static const char* stateToChar(WeaponState state); 203 207 208 void setPreferedSlot(int slot, int side) { this->preferedSlot = slot; this->preferedSide = side; } 204 209 205 210 … … 261 266 Animation3D*** shootAnim; 262 267 268 int preferedSlot; //!< prefered slot to add 269 int preferedSide; //!< prefered side (left/right) to be added 270 263 271 }; 264 272
Note: See TracChangeset
for help on using the changeset viewer.