Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 1, 2015, 10:06:17 PM (9 years ago)
Author:
landauf
Message:

don't add the pawn's velocity to the projectile's velocity. this makes no sense if the pawn's velocity is perpendicular to the projectile's velocity (e.g. for side turrets or when the pawn is 'strafing'). if at all, only the part of the pawn's velocity which has the same direction like the projectile should be considered. but this still makes projectiles unpredictable because they have changing speed. so better don't do it at all.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/weapons/weaponmodes/LaserFire.cc

    r10294 r10296  
    6868        projectile->setOrientation(this->getMuzzleOrientation());
    6969        projectile->setPosition(this->getMuzzlePosition());
    70         projectile->setVelocity(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getVelocity() + this->getMuzzleDirection() * this->speed_);
     70        projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
    7171
    7272        projectile->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
Note: See TracChangeset for help on using the changeset viewer.