[Orxonox-commit 7386] r12003 - in code/branches/3DPacman_FS18: data/levels/templates src/modules/pacman

dreherm at orxonox.net dreherm at orxonox.net
Thu May 24 16:22:49 CEST 2018


Author: dreherm
Date: 2018-05-24 16:22:49 +0200 (Thu, 24 May 2018)
New Revision: 12003

Modified:
   code/branches/3DPacman_FS18/data/levels/templates/PacmanGelb.oxt
   code/branches/3DPacman_FS18/src/modules/pacman/Pacman.cc
   code/branches/3DPacman_FS18/src/modules/pacman/PacmanPointSphere.cc
Log:
Test 2

Modified: code/branches/3DPacman_FS18/data/levels/templates/PacmanGelb.oxt
===================================================================
--- code/branches/3DPacman_FS18/data/levels/templates/PacmanGelb.oxt	2018-05-24 14:14:56 UTC (rev 12002)
+++ code/branches/3DPacman_FS18/data/levels/templates/PacmanGelb.oxt	2018-05-24 14:22:49 UTC (rev 12003)
@@ -43,18 +43,11 @@
     </engines>
     <attached>
       <Model position="0,0,0" yaw=180 pitch=0 roll=0 scale=5 mesh="PacmanGelb.mesh" />
-<!--Model mesh="cube.mesh" mass=10 position="0,0,3" scale3D="10,4,8" />
-<Model mesh="cube.mesh" mass=10 position="12.6,-2,3" scale3D="2.8,2.8,11" />
-<Model mesh="cube.mesh" mass=10 position="-12.6,-2,3" scale3D="2.8,2.8,11" />
-<Model mesh="cube.mesh" mass=10 position="0,0,-12" scale3D="4,4,7" /-->
     </attached>
     <collisionShapes>
-      <BoxCollisionShape position="0    ,0 ,  0" halfExtents="1,1,1" />
+      <BoxCollisionShape position="0    ,0 ,  0" halfExtents="1,50,1" />
     </collisionShapes>
 
-<?lua
-  include("../includes/weaponSettingsEscort.oxi")
-?>
   </PacmanGelb>
 </Template>
 
@@ -61,7 +54,7 @@
 <Template name=spaceshipescortcameras defaults=0>
   <PacmanGelb>
     <camerapositions>
-      <CameraPosition position="0,7, 5" drag=true mouselook=true />
+      <CameraPosition position="0,7, 10" drag=true mouselook=true />
     </camerapositions>
   </PacmanGelb>
 </Template>
@@ -70,37 +63,17 @@
   <MultiStateEngine
    boostfactor    = 1.0
 
-   speedfront     = 60
-   speedback      = 20
+   speedfront     = 80
+   speedback      = 40
    speedleftright =  1
    speedupdown    =  1
 
-   defEngineSndNormal = "sounds/Engine_low.ogg"
-   defEngineSndBoost = "sounds/Engine_high.ogg"
-
-   accelerationfront     = 500
+   accelerationfront     = 100
    accelerationbrake     = 5
-   accelerationback      =  500
+   accelerationback      =  100
    accelerationleftright =  5
    accelerationupdown    =  5
   >
-    <EffectContainer condition="idle">
-      <WorldSound mainstate="activity" source="sounds/Engine_idle.ogg" looping=1 active=false/>
-       />
-      <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, -2, 14" colour="0.2, 0.5, 0.65, 1.0" width=150 length=15 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=2 turnofftime=1 material="Flares/ThrusterFlare1" />
-      <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-12, -2, 14" colour="0.2, 0.5, 0.65, 1.0" width=15 length=15 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=2 turnofftime=1 material="Flares/ThrusterFlare1" />
-    </EffectContainer>
-    <EffectContainer condition="not idle">
-      <FadingBillboard mainstate=activity active=false scale=0.09 position="12, -2, 13" colour="0.2, 1.0, 0.65, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
-      <FadingBillboard mainstate=activity active=false scale=0.09 position="-12, -2, 13" colour="0.2, 1.0, 0.65, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
-    </EffectContainer>
-    <EffectContainer condition="normal or brake">
 
-    </EffectContainer>
-    <EffectContainer condition="normal or boost">
-      <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, -2, 14" colour="0.2, 1.0, 0.65, 1.0" width=5 length=1500 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
-      <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-12, -2, 14" colour="0.2, 1.0, 0.65, 1.0" width=15 length=1500 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
-    </EffectContainer>
-
   </MultiStateEngine>
 </Template>

Modified: code/branches/3DPacman_FS18/src/modules/pacman/Pacman.cc
===================================================================
--- code/branches/3DPacman_FS18/src/modules/pacman/Pacman.cc	2018-05-24 14:14:56 UTC (rev 12002)
+++ code/branches/3DPacman_FS18/src/modules/pacman/Pacman.cc	2018-05-24 14:22:49 UTC (rev 12003)
@@ -120,10 +120,9 @@
             }
 
             //Check for collision with PointSpheres and PacmanPointAfraid
-            i = 0;
             for(PacmanPointSphere* nextsphere : ObjectList<PacmanPointSphere>()){
-                if(collis(nextsphere->getPosition(), currentPosition))
-                 takePoint(nextsphere);
+                 if(nextsphere->taken(currentPosition))
+                    takePoint(nextsphere);
             }
 
             for(PacmanPointAfraid* next : ObjectList<PacmanPointAfraid>()){
@@ -207,10 +206,6 @@
             this->levelUp();
             return;
         }
-        //Set PointSphere under map
-        Vector3 postaken = taken->getPosition();
-        postaken.y = -50;
-        taken->setPosition(postaken);
     }
 
 

Modified: code/branches/3DPacman_FS18/src/modules/pacman/PacmanPointSphere.cc
===================================================================
--- code/branches/3DPacman_FS18/src/modules/pacman/PacmanPointSphere.cc	2018-05-24 14:14:56 UTC (rev 12002)
+++ code/branches/3DPacman_FS18/src/modules/pacman/PacmanPointSphere.cc	2018-05-24 14:22:49 UTC (rev 12003)
@@ -75,11 +75,10 @@
     bool PacmanPointSphere::taken(Vector3 playerpos)
     {
         resetposition = this->getPosition();
-      if((abs(this->resetposition.x - playerpos.x)<5) && (abs(this->resetposition.z - playerpos.z)<5)){
+      if((abs(this->resetposition.x - playerpos.x)<5) && (abs(this->resetposition.y - playerpos.y)<5) && (abs(this->resetposition.z - playerpos.z)<5)){
         this->setPosition(Vector3(resetposition.x, -50, resetposition.z));
         return true;
       } 
-
       return false;
     }
 



More information about the Orxonox-commit mailing list