[Orxonox-commit 7304] r11921 - code/branches/3DPacman_FS18/src/modules/pacman
dreherm at orxonox.net
dreherm at orxonox.net
Sun Apr 29 13:55:17 CEST 2018
Author: dreherm
Date: 2018-04-29 13:55:17 +0200 (Sun, 29 Apr 2018)
New Revision: 11921
Modified:
code/branches/3DPacman_FS18/src/modules/pacman/PacmanGhost.cc
Log:
Disk quota test 2
Modified: code/branches/3DPacman_FS18/src/modules/pacman/PacmanGhost.cc
===================================================================
--- code/branches/3DPacman_FS18/src/modules/pacman/PacmanGhost.cc 2018-04-29 11:41:52 UTC (rev 11920)
+++ code/branches/3DPacman_FS18/src/modules/pacman/PacmanGhost.cc 2018-04-29 11:55:17 UTC (rev 11921)
@@ -45,7 +45,7 @@
{
RegisterObject(PacmanGhost);
- this->velocity = Vector3(0, 0, 0);
+ /* this->velocity = Vector3(0, 0, 0);
this->setCollisionType(CollisionType::Dynamic);
@@ -54,7 +54,7 @@
this->actuelposition = this->getPosition();
this->target_x = actuelposition.x;
- this->target_z = actuelposition.z;
+ this->target_z = actuelposition.z; */
}
@@ -77,7 +77,7 @@
}
-
+ /*
Vector3 possibleposition[] = {Vector3(20,10,245),Vector3(215,10,245),Vector3(215,10,195),Vector3(185,10,195),Vector3(135,10,195), //0-4
Vector3(185,10,150),Vector3(135,10,150),Vector3(215,10,150),Vector3(215,10,105),Vector3(135,10,105), //5-9
Vector3(135,10,15),Vector3(135,10,-85),Vector3(215,10,-85),Vector3(135,10,-135),Vector3(215,10,-135), //10-14
@@ -93,7 +93,7 @@
Vector3(20,10,-135),Vector3(70,10,-135),Vector3(20,10,-195),Vector3(-20,10,-195),Vector3(-135,10,-195), //60-64
Vector3(-215,10,-195),Vector3(0,10,-35) //65-66
};
-
+*/
/**
@brief
Defines which actions the AutonomousDrone has to take in each tick.
@@ -105,7 +105,7 @@
SUPER(PacmanGhost, tick, dt);
//setorientation
-
+/*
this->actuelposition = this->getPosition();
//Stop, if target arrived
@@ -330,10 +330,11 @@
this->resetGhost(); //Shouldn't happen...
} //End of Position table
}
-
+*/
}
void PacmanGhost::setnewTarget(int firstdec){
+ /*
decision = rand()%1;
switch(decision){
case 0:
@@ -342,9 +343,10 @@
this->ismoving = true;
break;
}
+ */
}
- void PacmanGhost::setnewTarget(int firstdec, int seconddec){
+ void PacmanGhost::setnewTarget(int firstdec, int seconddec){ /*
decision = rand()%2;
switch(decision){
case 0:
@@ -358,9 +360,11 @@
this->ismoving = true;
break;
}
+ */
}
void PacmanGhost::setnewTarget(int firstdec, int seconddec, int thirddec){
+ /*
decision = rand()%3;
switch(decision){
case 0:
@@ -379,9 +383,11 @@
this->ismoving = true;
break;
}
+ */
}
void PacmanGhost::setnewTarget(int firstdec, int seconddec, int thirddec, int fourthdec){
+ /*
decision = rand()%4;
switch(decision){
case 0:
@@ -405,20 +411,22 @@
this->ismoving = true;
break;
}
+ */
}
void PacmanGhost::move(float dt, Vector3 actuelposition, Vector3 velocity){
- this->setPosition(Vector3(actuelposition.x+20*velocity.x*dt,10,actuelposition.z+20*velocity.z*dt));
+ // this->setPosition(Vector3(actuelposition.x+20*velocity.x*dt,10,actuelposition.z+20*velocity.z*dt));
}
bool PacmanGhost::findpos(Vector3 one, Vector3 other){
- if((abs(one.x - other.x)<0.5) && (abs(one.z - other.z)<0.5)) return true;
- return false;
+ /* if((abs(one.x - other.x)<0.5) && (abs(one.z - other.z)<0.5)) return true;
+ return false; */
}
void PacmanGhost::resetGhost(){
+ /*
this->setPosition(this->resetposition);
this->ismoving = false;
this->actuelposition = this->getPosition();
@@ -425,5 +433,6 @@
this->target_x = actuelposition.x;
this->target_z = actuelposition.z;
+ */
}
}
\ No newline at end of file
More information about the Orxonox-commit
mailing list