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

    r10294 r10296  
    110110        projectile->setOrientation(this->getMuzzleOrientation());
    111111        projectile->setPosition(this->getMuzzlePosition());
    112         projectile->setVelocity(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getVelocity() + this->getMuzzleDirection() * this->speed_);
     112        projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
    113113
    114114        projectile->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
Note: See TracChangeset for help on using the changeset viewer.