Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 11, 2017, 4:06:44 PM (6 years ago)
Author:
vyang
Message:

Projektile fliegen in 2D Ebene, jedoch in eine falsche Richtung. Kommentare hinzugefuegt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DWeapon.cc

    r11645 r11660  
    2121 *
    2222 *   Author:
    23  *      Florian Zinggeler
     23 *      Viviane Yang
    2424 *   Co-authors:
    2525 *      --
     
    4848#include "weapons/MuzzleFlash.h"
    4949
     50#include "Asteroids2D.h"
     51
    5052namespace orxonox
    5153{
     
    5557    {
    5658        RegisterObject(Asteroids2DWeapon);
     59
     60
    5761    }
    5862
     
    6165
    6266    }
     67
     68    Asteroids2D* Asteroids2DWeapon::getGame()
     69    {
     70        if (game == nullptr)
     71        {
     72            for (Asteroids2D* race : ObjectList<Asteroids2D>())
     73            {
     74                game = race;
     75            }
     76        }
     77        return game;
     78    }
     79
    6380
    6481    void Asteroids2DWeapon::shot()
     
    7592
    7693        this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
    77         projectile->setOrientation(this->getMuzzleOrientation());
     94
     95        //projectile->setOrientation(this->getGame()->getPlayer()->getOrientation());
    7896        projectile->setPosition(this->getMuzzlePosition());
    7997
     98
     99        //auf 2D Ebene druecken
    80100        Vector3 muzzle2D = this->getMuzzleDirection();
    81101        muzzle2D.y = 0;
Note: See TracChangeset for help on using the changeset viewer.