- Timestamp:
- Dec 11, 2017, 4:06:44 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DWeapon.cc
r11645 r11660 21 21 * 22 22 * Author: 23 * Florian Zinggeler23 * Viviane Yang 24 24 * Co-authors: 25 25 * -- … … 48 48 #include "weapons/MuzzleFlash.h" 49 49 50 #include "Asteroids2D.h" 51 50 52 namespace orxonox 51 53 { … … 55 57 { 56 58 RegisterObject(Asteroids2DWeapon); 59 60 57 61 } 58 62 … … 61 65 62 66 } 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 63 80 64 81 void Asteroids2DWeapon::shot() … … 75 92 76 93 this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition()); 77 projectile->setOrientation(this->getMuzzleOrientation()); 94 95 //projectile->setOrientation(this->getGame()->getPlayer()->getOrientation()); 78 96 projectile->setPosition(this->getMuzzlePosition()); 79 97 98 99 //auf 2D Ebene druecken 80 100 Vector3 muzzle2D = this->getMuzzleDirection(); 81 101 muzzle2D.y = 0;
Note: See TracChangeset
for help on using the changeset viewer.