Changeset 10140 in orxonox.OLD for branches/playability/src/world_entities/weapons/weapon.cc
- Timestamp:
- Dec 22, 2006, 9:36:55 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/weapons/weapon.cc
r10136 r10140 119 119 } 120 120 121 this->soundSource = new OrxSound::SoundSource(this); //< Every Weapon has exacty one SoundSource. 122 this->emissionPoint.setParent(this); //< One EmissionPoint, that is a PNode connected to the weapon. You can set this to the exitting point of the Projectiles 123 this->emissionPoint.setName("EmissionPoint"); 124 this->emissionPoint.addNodeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT); 121 this->soundSource = new OrxSound::SoundSource(this); //< Every Weapon has exacty one SoundSource 122 123 this->barrels = 1; 124 this->segs = 1; 125 126 this->emissionPoint = new PNode*[this->barrels]; 127 for(int i = 0; i < this->barrels; i++){ 128 this->emissionPoint[i] = new PNode; 129 this->emissionPoint[i]->setParent(this); //< One EmissionPoint, that is a PNode connected to the weapon. You can set this to the exitting point of the Projectiles 130 this->emissionPoint[i]->setName("EmissionPoint"); 131 this->emissionPoint[i]->addNodeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT); 132 } 125 133 126 134 this->defaultTarget = NULL; //< Nothing is Targeted by default. … … 154 162 LoadParam(root, "projectile", this, Weapon, setProjectileTypeC) 155 163 .describe("Sets the name of the Projectile to load onto the Entity"); 156 164 /* 157 165 LoadParam(root, "emission-point", this, Weapon, setEmissionPoint) 158 .describe("Sets the Point of emission of this weapon ");166 .describe("Sets the Point of emission of this weapon (1: EmmsionVector; 2: EmissionPoint)");*/ 159 167 160 168 LoadParam(root, "state-duration", this, Weapon, setStateDuration) … … 253 261 * @param point the Point relative to the mass-point of the Weapon 254 262 */ 263 void Weapon::setEmissionPoint(const Vector& point, int barrel) 264 { 265 this->emissionPoint[barrel]->setRelCoor(point); 266 } 267 255 268 void Weapon::setEmissionPoint(const Vector& point) 256 269 { 257 this->emissionPoint.setRelCoor(point); 258 } 259 270 this->emissionPoint[0]->setRelCoor(point); 271 } 260 272 261 273 /**
Note: See TracChangeset
for help on using the changeset viewer.