Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 15, 2010, 3:35:31 PM (15 years ago)
Author:
scheusso
Message:

correcting initial speed of projectiles

File:
1 edited

Legend:

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

    r5929 r6732  
    3939#include "weaponsystem/WeaponPack.h"
    4040#include "weaponsystem/WeaponSystem.h"
     41#include "worldentities/pawns/Pawn.h"
    4142
    4243namespace orxonox
     
    107108        projectile->setOrientation(this->getMuzzleOrientation());
    108109        projectile->setPosition(this->getMuzzlePosition());
    109         projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
     110        projectile->setVelocity(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getVelocity() + this->getMuzzleDirection() * this->speed_);
    110111
    111112        projectile->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
Note: See TracChangeset for help on using the changeset viewer.