[Orxonox-commit 6971] r11592 - code/branches/SOBv2_HS17/src/modules/superorxobros
zarron at orxonox.net
zarron at orxonox.net
Mon Nov 27 13:41:13 CET 2017
Author: zarron
Date: 2017-11-27 13:41:13 +0100 (Mon, 27 Nov 2017)
New Revision: 11592
Modified:
code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFigure.cc
Log:
shooting mechanism fixed
Modified: code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFigure.cc
===================================================================
--- code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFigure.cc 2017-11-27 12:39:12 UTC (rev 11591)
+++ code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFigure.cc 2017-11-27 12:41:13 UTC (rev 11592)
@@ -126,7 +126,6 @@
SOBGame->addMushroom(); // Tell the gametype to increase points
mush->hasCollided_ = true; // needed because of destroyLater takes some time and player should receive points only once
-
}
@@ -200,11 +199,18 @@
if (ball != nullptr && center_ != nullptr)
{
ball->addTemplate("fireball");
- ball->setPosition(spawnpos);
bool direction = ((this->getWorldOrientation().getRoll().valueRadians())>-1.6&&(this->getWorldOrientation().getRoll().valueRadians()<1.6));
ball->setDirection(direction);
orxout() << "Rotation: " << this->getWorldOrientation().getRoll() << " direction: "<< direction <<endl;
- //ball->
+ if(direction)
+ {
+ spawnpos.x+=10;
+ }
+ else
+ {
+ spawnpos.x-=10;
+ }
+ ball->setPosition(spawnpos);
}
}
More information about the Orxonox-commit
mailing list