Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3686 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Mar 31, 2005, 12:28:28 AM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: fixed speed issue, was a problem with the current track defined in the debug level

Location:
orxonox/trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/defs/debug.h

    r3685 r3686  
    5858// DEFINE MODULES \\
    5959#define DEBUG_MODULE_ORXONOX            0
    60 #define DEBUG_MODULE_WORLD              3
    61 #define DEBUG_MODULE_PNODE              0
     60#define DEBUG_MODULE_WORLD              0
     61#define DEBUG_MODULE_PNODE              3
    6262#define DEBUG_MODULE_WORLD_ENTITY       0
    63 #define DEBUG_MODULE_COMMAND_NODE       0
     63#define DEBUG_MODULE_COMMAND_NODE       3
    6464#define DEBUG_MODULE_GRAPHICS           0
    6565#define DEBUG_MODULE_LOAD               0
  • orxonox/trunk/src/lib/coord/p_node.cc

    r3683 r3686  
    422422{
    423423  if(this->time == 0)
    424     return 0;
    425   Vector* diff = new Vector();
    426   *diff = *this->absCoordinate - *this->lastAbsCoordinate;
    427   float x = diff->len();
     424    return 1000;
     425  Vector diff;
     426  diff = *this->absCoordinate - *this->lastAbsCoordinate;
     427  float x = diff.len();
    428428  return x / this->time;
    429429}
  • orxonox/trunk/src/story_entities/world.cc

    r3678 r3686  
    206206      // initializing the TrackManager
    207207      trackManager = TrackManager::getInstance();
    208       trackManager->addPoint(Vector(0,0,0));
    209       trackManager->addPoint(Vector(100, -40, 5));
    210       trackManager->addPoint(Vector(200,-40,-8));
    211       trackManager->addPoint(Vector(250, -35, -2));
     208      //trackManager->addPoint(Vector(0,0,0));
     209      trackManager->addPoint(Vector(150, -35, 5));
     210      trackManager->addPoint(Vector(200,-35, 5));
     211      trackManager->addPoint(Vector(250, -35, 5));
    212212      trackManager->addPoint(Vector(320,-33,-.55));
    213       trackManager->setDuration(3);
     213      trackManager->setDuration(2);
    214214      trackManager->setSavePoint();
     215
    215216      trackManager->addPoint(Vector(410, 0, 0));
    216217      trackManager->addPoint(Vector(510, 20, -10));
  • orxonox/trunk/src/world_entities/player.cc

    r3685 r3686  
    5252  acceleration = 10.0;
    5353  //weapons:
    54   Weapon* wp = new TestGun(this, new Vector(), new Quaternion());
     54  Weapon* wp = new TestGun(this, new Vector(-1.1, 0.0, 2.6), new Quaternion());
    5555  this->weapons->add(wp);
    5656  this->activeWeapon = wp; 
  • orxonox/trunk/src/world_entities/projectile.cc

    r3685 r3686  
    9999void Projectile::tick (float time)
    100100{
    101   this->speed = this->weapon->getSpeed() * 3; 
    102   this->shiftCoor(*this->flightDirection * this->speed * time);
    103   //printf("current speed is: %f\n", this->speed);
     101  this->speed = this->weapon->getSpeed() * 3;
     102  Vector v;
     103  v = *this->flightDirection * this->speed * time;
     104  this->shiftCoor(v);
     105  //printf("PROJECTILE: current direction is:    (%f, %f, %f)\n",this->flightDirection->x, this->flightDirection->y, this->flightDirection->z );
     106  //printf("PROJECTILE: current shift vector is: (%f, %f, %f)\n", v.x, v.y, v.z);
     107  //printf("PROJECTILE: current speed is: %f\n", this->speed);
     108  //printf("PROJECTILE: current dt is:    %f\n", time);
     109  //this->debug();
    104110
    105111  this->currentLifeTime += time;
     
    110116      PRINTF(5)("FINALIZE=============================================================\n");
    111117      this->finalize();
     118      this->currentLifeTime = 0.0f;
    112119    }
    113120}
  • orxonox/trunk/src/world_entities/test_gun.cc

    r3685 r3686  
    132132{
    133133  this->localTime += time;
     134  //this->debug();
     135  //printf("TEST_GUN: this speed is: %f\n", this->getSpeed());
    134136}
    135137
Note: See TracChangeset for help on using the changeset viewer.