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/LightningGun.cc

    r10294 r10296  
    7474        projectile->setOrientation(this->getMuzzleOrientation());
    7575        projectile->setPosition(this->getMuzzlePosition());
    76         projectile->setVelocity(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getVelocity() + this->getMuzzleDirection() * this->speed_);
     76        projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
    7777
    7878        projectile->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
Note: See TracChangeset for help on using the changeset viewer.