[Orxonox-commit 7766] r12358 - in code/branches/Boxhead_FS19: data/levels/templates src/modules/hover

kofrey at orxonox.net kofrey at orxonox.net
Thu May 9 15:08:21 CEST 2019


Author: kofrey
Date: 2019-05-09 15:08:21 +0200 (Thu, 09 May 2019)
New Revision: 12358

Modified:
   code/branches/Boxhead_FS19/data/levels/templates/spaceshipzombie.oxt
   code/branches/Boxhead_FS19/src/modules/hover/Hover.cc
   code/branches/Boxhead_FS19/src/modules/hover/HoverShip.cc
Log:
added collision damamge

Modified: code/branches/Boxhead_FS19/data/levels/templates/spaceshipzombie.oxt
===================================================================
--- code/branches/Boxhead_FS19/data/levels/templates/spaceshipzombie.oxt	2019-05-09 12:54:22 UTC (rev 12357)
+++ code/branches/Boxhead_FS19/data/levels/templates/spaceshipzombie.oxt	2019-05-09 13:08:21 UTC (rev 12358)
@@ -35,6 +35,8 @@
    mass              = 100
    linearDamping     = 0.2
    angularDamping    = 0.9999999
+   collisiondamage = 100
+    enablecollisiondamage = true
 
 
   >

Modified: code/branches/Boxhead_FS19/src/modules/hover/Hover.cc
===================================================================
--- code/branches/Boxhead_FS19/src/modules/hover/Hover.cc	2019-05-09 12:54:22 UTC (rev 12357)
+++ code/branches/Boxhead_FS19/src/modules/hover/Hover.cc	2019-05-09 13:08:21 UTC (rev 12358)
@@ -35,10 +35,10 @@
 
 #include "HoverOrigin.h"
 #include "HoverWall.h"
-
-#include "MazeGenerator.h"
+// #include "HoverFlag.h"
+ #include "MazeGenerator.h"
 #include "core/CoreIncludes.h"
-    
+#include "core/input/KeyBinderManager.h"    
 
 
 namespace orxonox
@@ -45,8 +45,20 @@
 {
     RegisterUnloadableClass(Hover);
 
+
+
+
+
     Hover::Hover(Context* context) : Gametype(context)
     {
+        
+
+        // HoverKeyBinderManager::getInstance().setConfigValues();
+
+
+        // KeyBinderManager::getInstance().unbind("YNeg");
+        // KeyBinderManager::getInstance().unbind("YPos");
+
         RegisterObject(Hover);
 
         this->origin_ = nullptr;
@@ -97,7 +109,7 @@
             //Generate 5 flags randomly
             // for ( int i = 0; i < 5; i++ )
             // {
-            //     HoverFlag* zombieship = new SpaceShip(origin_->getContext());
+            //     HoverFlag* flag = new HoverFlag(origin_->getContext());
             //     flag->init(rand()%numCells, rand()%numCells, cellSize);
             //     flags_.push_back(flag);
             // }

Modified: code/branches/Boxhead_FS19/src/modules/hover/HoverShip.cc
===================================================================
--- code/branches/Boxhead_FS19/src/modules/hover/HoverShip.cc	2019-05-09 12:54:22 UTC (rev 12357)
+++ code/branches/Boxhead_FS19/src/modules/hover/HoverShip.cc	2019-05-09 13:08:21 UTC (rev 12358)
@@ -100,6 +100,11 @@
             this->isFloor_ = false;
         }
 
+        if(otherObject->isA(Class(SpaceShip)))
+        {
+            removeHealth(0.1);
+        }
+
         return false;
     }
 



More information about the Orxonox-commit mailing list