Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 18, 2007, 6:02:47 PM (17 years ago)
Author:
nicolasc
Message:

crosshair moves, shot do too, but not exactly where they should

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/world_entities/weapons/disruptor.cc

    r10702 r10719  
    153153  pj->setParent(PNode::getNullParent());
    154154
    155   pj->setVelocity(this->getAbsDir().apply(Vector(1,0,0))*130 + VECTOR_RAND(1));
     155  Vector tmp = this->getDefaultTarget()->getAbsCoor() - this->getAbsCoor();
     156
     157//   pj->setVelocity(this->getAbsDir().apply(Vector(1,0,0))*130 + VECTOR_RAND(1));
     158  pj->setVelocity(this->getAbsDir().apply(tmp.getNormalized())*130 + VECTOR_RAND(1));
    156159
    157160  pj->setAbsCoor(this->emissionPoint[this->activeBarrel]->getAbsCoor());
    158   pj->setAbsDir(this->getAbsDir());
     161//   pj->setAbsDir(this->getAbsDir());
    159162  pj->activate();
    160163
Note: See TracChangeset for help on using the changeset viewer.