[Orxonox-commit 6976] r11597 - in code/branches/SOBv2_HS17: data/levels src/modules/superorxobros

varxth at orxonox.net varxth at orxonox.net
Mon Nov 27 14:21:12 CET 2017


Author: varxth
Date: 2017-11-27 14:21:11 +0100 (Mon, 27 Nov 2017)
New Revision: 11597

Modified:
   code/branches/SOBv2_HS17/data/levels/SOB.oxw
   code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFigure.cc
   code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFireball.cc
   code/branches/SOBv2_HS17/src/modules/superorxobros/SOBQBlock.cc
Log:
Collisionshape of fireball

Modified: code/branches/SOBv2_HS17/data/levels/SOB.oxw
===================================================================
--- code/branches/SOBv2_HS17/data/levels/SOB.oxw	2017-11-27 13:05:12 UTC (rev 11596)
+++ code/branches/SOBv2_HS17/data/levels/SOB.oxw	2017-11-27 13:21:11 UTC (rev 11597)
@@ -63,17 +63,15 @@
 		</SOBFigure>
 	</Template> 
 
-					<!--Test Fireball-->
 
-
 	<Template name=fireball>
-		<SOBFireball collisionType="dynamic" speed=80>
+		<SOBFireball collisionType="dynamic" speed=90>
 			<attached>
 				<Model mesh="planets/sol.mesh" position="0,0,0" scale=3 pitch=90/> 
 				
 			</attached>
 			<collisionShapes>
-				<SphereCollisionShape position="0,0,0" halfExtents="5,5,5" /> 			
+				<SphereCollisionShape position="0,0,0" radius="3" /> 			
 			</collisionShapes>
 		</SOBFireball>
 	</Template>

Modified: code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFigure.cc
===================================================================
--- code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFigure.cc	2017-11-27 13:05:12 UTC (rev 11596)
+++ code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFigure.cc	2017-11-27 13:21:11 UTC (rev 11597)
@@ -159,7 +159,8 @@
     }
 
         else if (fireball != nullptr && !(fireball->hasCollided_)){
-            //this-> die();
+            PowerUpCounter_--;
+            this->changeClothes();
         }
 
     //Purpose is that if player hits the flag, he should walk into the castle at the end of the level. For that we use SOBCastlestone

Modified: code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFireball.cc
===================================================================
--- code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFireball.cc	2017-11-27 13:05:12 UTC (rev 11596)
+++ code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFireball.cc	2017-11-27 13:21:11 UTC (rev 11597)
@@ -164,7 +164,7 @@
             velocity.z -= gravityAcceleration_*dt;
             velocity.x = dir*speed_;
             velocity.y = 0;
-            if(hitCounter_ >= 3) velocity.y = 50;
+            if(hitCounter_ >= 3) velocity.y = 0.1*speed_;
             setVelocity(velocity);
 
             lastPos_ = getPosition();

Modified: code/branches/SOBv2_HS17/src/modules/superorxobros/SOBQBlock.cc
===================================================================
--- code/branches/SOBv2_HS17/src/modules/superorxobros/SOBQBlock.cc	2017-11-27 13:05:12 UTC (rev 11596)
+++ code/branches/SOBv2_HS17/src/modules/superorxobros/SOBQBlock.cc	2017-11-27 13:21:11 UTC (rev 11597)
@@ -64,7 +64,6 @@
         //If you hit the QBlock, the visibility of all attached objects get inverted! Pretty easy way to create changing blocks :)
         float v_z = otherObject->getVelocity().z;
         int collDisZ_ = getPosition().z - contactPoint.getPositionWorldOnB().getZ();
-        orxout() << "Distanz in z: " << collDisZ_ << endl;
         if (!used_ && v_z > 50.0 && collDisZ_ > 0) {
             used_ = true;
 



More information about the Orxonox-commit mailing list