Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6153


Ignore:
Timestamp:
Nov 25, 2009, 6:04:10 PM (15 years ago)
Author:
scheusso
Message:

some fixes in weapon system / weapons
fabian: projectiles also spawn on wrong position in standalone mode

Location:
code/branches/presentation2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/data/gui/scripts/InitialiseGUI.lua

    r6150 r6153  
    187187        local child
    188188        while root:getChildCount()~=0 do
    189             debug(root:getChildCount())
    190189            child = root:getChildAtIdx(0)
    191190            root:removeChildWindow(child)
  • code/branches/presentation2/src/modules/weapons/weaponmodes/LightningGun.cc

    r5781 r6153  
    5959        projectile->setMaterial("Flares/LightningBall_");
    6060
     61        this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
    6162        projectile->setOrientation(this->getMuzzleOrientation());
    6263        projectile->setPosition(this->getMuzzlePosition());
  • code/branches/presentation2/src/modules/weapons/weaponmodes/RocketFire.cc

    r6107 r6153  
    3636#include "weaponsystem/WeaponPack.h"
    3737#include "weaponsystem/WeaponSystem.h"
     38#include "worldentities/pawns/Pawn.h"
    3839
    3940namespace orxonox
     
    5758        Rocket* rocket = new Rocket(this);
    5859
     60        this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
    5961        rocket->setOrientation(this->getMuzzleOrientation());
    6062        rocket->setPosition(this->getMuzzlePosition());
  • code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.cc

    r6152 r6153  
    205205            this->muzzlePosition_ = this->weapon_->getWorldPosition() + this->weapon_->getWorldOrientation() * this->muzzleOffset_;
    206206
    207             Pawn* pawn = this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn();
    208207            Vector3 muzzleDirection;
    209208            muzzleDirection = target - this->muzzlePosition_;
Note: See TracChangeset for help on using the changeset viewer.