Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 22, 2011, 3:05:26 PM (13 years ago)
Author:
dafrick
Message:

Cleaning up game immersion. Roughly documenting weapons module.

File:
1 edited

Legend:

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

    r8706 r8855  
    2727 */
    2828
     29/**
     30    @file LaserFire.h
     31    @brief Implementation of the LaserFire class.
     32*/
     33
    2934#include "LaserFire.h"
    3035
    3136#include "core/CoreIncludes.h"
    32 #include "weapons/projectiles/ParticleProjectile.h"
     37
    3338#include "weaponsystem/Weapon.h"
    3439#include "weaponsystem/WeaponPack.h"
    3540#include "weaponsystem/WeaponSystem.h"
    3641#include "worldentities/pawns/Pawn.h"
     42
     43#include "weapons/projectiles/ParticleProjectile.h"
    3744
    3845namespace orxonox
     
    4451        RegisterObject(LaserFire);
    4552
    46         this->reloadTime_ = 0.25;
    47         this->damage_ = 0; //default 15
    48         this->speed_ = 1250;
     53        this->reloadTime_ = 0.25f;
     54        this->damage_ = 0.0f;
     55        this->speed_ = 1250.0f;
    4956
    5057        this->setMunitionName("LaserMunition");
    5158    }
    5259
    53     /* Creates the projectile object, sets its properties to the LaserFire properties
    54      */
     60    /**
     61    @brief
     62        Fires the weapon. Creates a projectile and fires it.
     63    */
    5564    void LaserFire::fire()
    5665    {
     
    6170        projectile->setVelocity(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getVelocity() + this->getMuzzleDirection() * this->speed_);
    6271
    63         projectile->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
     72        projectile->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
    6473        projectile->setDamage(this->getDamage());
    6574        projectile->setShieldDamage(this->getShieldDamage());
Note: See TracChangeset for help on using the changeset viewer.