Changeset 10224 in orxonox.OLD for branches/playability/src/world_entities/weapons/spike_launcher.cc
- Timestamp:
- Jan 10, 2007, 5:33:19 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/weapons/spike_launcher.cc
r10217 r10224 219 219 float x, y, z; 220 220 for (int i = 0; i < this->spikes;i++){ 221 221 printf("%i ", i); 222 222 x = m[0][0] * this->launcher[i].x + m[0][1] * this->launcher[i].y + m[0][2] * this->launcher[i].z; 223 223 y = m[1][0] * this->launcher[i].x + m[1][1] * this->launcher[i].y + m[1][2] * this->launcher[i].z; … … 229 229 this->launcher[i] = Vector (x, y, z); 230 230 } 231 printf("\n"); 231 232 232 233 for( int i = 0; i < 3 ; i++) … … 241 242 updateFireDir(VECTOR_RAND(1), 20); 242 243 243 printf("fir eing spikes\n");244 printf("firing spikes\n"); 244 245 Projectile* pj = NULL; 245 246 for (int i = 0; i < this->spikes; i++) … … 250 251 251 252 // pj->setVelocity(this->getVelocity()+(this->getAbsDir().apply(Vector(1,0,0))*115.0 + VECTOR_RAND(10))); 252 pj->setVelocity(this->launcher[i] * 300.0);253 pj->setVelocity(this->launcher[i].getNormalized() * 300.0); 253 254 254 255 pj->setParent(PNode::getNullParent()); 255 256 pj->setAbsCoor(this->getAbsCoor() + this->launcher[i] * this->size); 256 //Quaternion q;257 //pj->setRelDir(q.lookAt(Vector(), this->launcher[i], VECTOR_RAND(1)));258 pj->setRelDir(90, this->launcher[i].x, this->launcher[i].y, this->launcher[i].z);259 260 pj->toList(this->getOMListNumber()); 257 Quaternion q; 258 pj->setRelDir(q.lookAt(Vector(), this->launcher[i], VECTOR_RAND(1))); 259 // pj->setRelDir(90, this->launcher[i].x, this->launcher[i].y, this->launcher[i].z); 260 261 /* pj->toList(this->getOMListNumber());*/ 261 262 pj->activate(); 262 263 }
Note: See TracChangeset
for help on using the changeset viewer.