Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

correcting initial speed of projectiles

File:
1 edited

Legend:

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

    r5781 r6732  
    3434#include "weaponsystem/WeaponPack.h"
    3535#include "weaponsystem/WeaponSystem.h"
     36#include "worldentities/pawns/Pawn.h"
    3637
    3738namespace orxonox
     
    5657        projectile->setOrientation(this->getMuzzleOrientation());
    5758        projectile->setPosition(this->getMuzzlePosition());
    58         projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
     59        projectile->setVelocity(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getVelocity() + this->getMuzzleDirection() * this->speed_);
    5960
    6061        projectile->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
Note: See TracChangeset for help on using the changeset viewer.