Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 10, 2007, 5:33:19 PM (18 years ago)
Author:
nicolasc
Message:

bump

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/world_entities/weapons/spike_launcher.cc

    r10217 r10224  
    219219  float x, y, z;
    220220  for (int i = 0; i < this->spikes;i++){
    221 
     221    printf("%i ", i);
    222222    x = m[0][0] * this->launcher[i].x + m[0][1] * this->launcher[i].y + m[0][2] * this->launcher[i].z;
    223223    y = m[1][0] * this->launcher[i].x + m[1][1] * this->launcher[i].y + m[1][2] * this->launcher[i].z;
     
    229229    this->launcher[i] = Vector (x, y, z);
    230230  }
     231  printf("\n");
    231232
    232233  for( int i = 0; i < 3 ; i++)
     
    241242  updateFireDir(VECTOR_RAND(1), 20);
    242243
    243   printf("fireing spikes\n");
     244  printf("firing spikes\n");
    244245  Projectile* pj = NULL;
    245246  for (int i = 0; i < this->spikes; i++)
     
    250251
    251252//     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);
    253254
    254255    pj->setParent(PNode::getNullParent());
    255256    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());*/
    261262    pj->activate();
    262263  }
Note: See TracChangeset for help on using the changeset viewer.