Changeset 10196 in orxonox.OLD for branches/playability/src/world_entities/weapons/spike_launcher.cc
- Timestamp:
- Jan 8, 2007, 9:46:13 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/weapons/spike_launcher.cc
r10188 r10196 102 102 this->size = 2.5; 103 103 104 this->setEmissionPoint(0.0, 0.0, 0.0); 105 106 104 107 this->spikes = 26; 105 108 this->launcher = new Vector [this->spikes]; … … 128 131 } 129 132 130 // this->setEmissionPoint(1.684, 0.472, 0);131 133 this->getProjectileFactory()->prepare(this->spikes); //we don't need more... 132 134 133 this->setActionSound(WA_SHOOT, "sound/explosions/explosion_1.wav");134 this->setActionSound(WA_ACTIVATE, "sound/vocals/missiles.wav");135 this->setActionSound(WA_RELOAD, "sound/vocals/reload.wav");135 // this->setActionSound(WA_SHOOT, "sound/explosions/explosion_1.wav"); 136 // this->setActionSound(WA_ACTIVATE, "sound/vocals/missiles.wav"); 137 // this->setActionSound(WA_RELOAD, "sound/vocals/reload.wav"); 136 138 137 139 } … … 179 181 180 182 float nx, ny, nz, ca, sa; 183 181 184 nx = v.x; 182 185 ny = v.y; … … 187 190 // final version below... easier to to cheat with the one above. 188 191 /* 189 nx = this->getParent()->getRotationVector().x 190 ny = this->getParent()->getRotationVector().y 191 nz = this->getParent()->getRotationVector().z 192 nx = this->getParent()->getRotationVector().x; 193 ny = this->getParent()->getRotationVector().y; 194 nz = this->getParent()->getRotationVector().z; 192 195 193 196 ca = cos (this->getParent()->getAngle()); … … 212 215 this->launcher[i] = Vector (x, y, z); 213 216 } 217 218 for( int i = 0; i < 3 ; i++) 219 delete m[i]; 220 delete m; 214 221 } 215 222 … … 222 229 223 230 Projectile* pj = NULL; 224 // for( ObjectList<Playable>::const_iterator eIterator = Playable::objectList().begin(); eIterator !=Playable::objectList().end(); eIterator++)225 231 for (int i = 0; i < this->spikes; i++) 226 232 { … … 230 236 231 237 // pj->setVelocity(this->getVelocity()+(this->getAbsDir().apply(Vector(1,0,0))*115.0 + VECTOR_RAND(10))); 232 pj->setVelocity(this->launcher[i] * 200.0);238 pj->setVelocity(this->launcher[i] * 300.0); 233 239 234 240 pj->setParent(PNode::getNullParent()); 235 241 pj->setAbsCoor(this->getAbsCoor() + this->launcher[i] * this->size); 236 pj->setAbsDir(Quaternion(this->launcher[i], 0)); 242 pj->setRelDir(0, this->launcher[i].x, this->launcher[i].y, this->launcher[i].z); 243 244 pj->toList(this->getOMListNumber()); 237 245 pj->activate(); 238 246 }
Note: See TracChangeset
for help on using the changeset viewer.