Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9087 in orxonox.OLD


Ignore:
Timestamp:
Jul 4, 2006, 1:57:44 AM (18 years ago)
Author:
bensch
Message:

some valgrind bugs

Location:
branches/presentation/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/lib/shell/shell_buffer.cc

    r8350 r9087  
    4141  ShellBuffer* ShellBuffer::singletonRef = NULL;
    4242  std::list<std::string> ShellBuffer::buffer;
    43   char ShellBuffer::bufferArray[SHELL_BUFFER_SIZE];
     43  char ShellBuffer::bufferArray[SHELL_BUFFER_SIZE] = "";
    4444
    4545
  • branches/presentation/src/world_entities/npcs/door.cc

    r9003 r9087  
    4545
    4646
    47 Door::Door ()
    48 {
    49   this->init();
    50 }
    51 
    52 
    5347Door::Door(const TiXmlElement* root)
    5448{
     
    5650  this->setClassID(CL_DOOR, "Door");
    5751  this->scale = 1.0f;
     52  this->actionRadius = 1.0;
    5853
    5954  if( root != NULL)
     
    6257  this->toList(OM_COMMON);
    6358  this->bLocked = false;
     59  this->bOpen = false;
    6460
    6561  this->loadMD2Texture("maps/doors.jpg");
  • branches/presentation/src/world_entities/npcs/door.h

    r9003 r9087  
    2222{
    2323  public:
    24     Door ();
    25     Door(const TiXmlElement* root);
     24    Door(const TiXmlElement* root = NULL);
    2625    virtual ~Door ();
    2726
     
    4342
    4443  private:
     44    void init();
    4545    bool checkOpen();
    4646    void setAnimation(int animNum, int playbackMode = 0);
  • branches/presentation/src/world_entities/npcs/generic_npc.cc

    r9066 r9087  
    8484  this->toList(OM_GROUP_00);
    8585
    86   if (this->soundBuffer != NULL)
    87     ResourceManager::getInstance()->unload(this->soundBuffer);
    8886  this->soundBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/rain.wav", WAV);
    8987
  • branches/presentation/src/world_entities/space_ships/spacecraft_2d.cc

    r9078 r9087  
    110110  this->airFriction = 2.0f;
    111111
     112
    112113  this->setHealthMax(100);
    113114  this->setHealth(100);
    114115
     116
     117  /// 2D-MODE
     118  this->travelHeight = 0.0f;
     119  this->toTravelHeight = NULL;
     120  this->travelSpeed = 0.0f;
    115121  this->travelNode = new PNode();
     122
     123
    116124  // camera - issue
    117125  this->cameraNode.addNodeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT);
     
    124132  this->burstEmitter->setParent(this);
    125133  this->burstEmitter->setRelCoor(0, -0.7, 0);
    126   this->burstEmitter->setRelDir(Quaternion(-M_PI_2, Vector(0,0,1)));
     134  this->burstEmitter->setRelDir(Quaternion(-M_PI, Vector(0,0,1)));
    127135  this->burstEmitter->setName("Spacecraft2D_Burst_emitter_Left");
    128136
     
    203211{
    204212  dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( true);
    205   this->setPlaymode(this->getPlaymode());
     213  this->setPlaymode(Playable::Full3D /*this->getPlaymode()*/);
    206214}
    207215
  • branches/presentation/src/world_entities/space_ships/spacecraft_2d.h

    r9074 r9087  
    2222
    2323    virtual void loadParams(const TiXmlElement* root);
     24
     25    void setTravelSpeed(float travelSpeed);
     26    void setTravelHeight(float travelHeight);
     27
     28
    2429    virtual void setPlayDirection(const Quaternion& rot, float speed = 0.0f);
    2530    virtual void enter();
    2631    virtual void leave();
     32
    2733
    2834    virtual void postSpawn();
     
    5157    float                 mouseSensitivity;   //!< the mouse sensitivity
    5258
     59    /// Normal Movement.
     60    Quaternion            direction;          //!< the direction of the Spacecraft2D.
     61    float                 acceleration;       //!< the acceleration of the Spacecraft2D.
     62    float                 airFriction;        //!< AirFriction.
    5363
     64    float                 airViscosity;
     65
     66
     67    /// 2D-traveling
    5468    PNode*                travelNode;
     69    float                 travelHeight;
     70    float*                toTravelHeight;
     71    float                 travelSpeed;        //!< the current speed of the Hove (to make soft movement)
    5572
     73    /// Camera
    5674    PNode                 cameraNode;
    5775    float                 cameraLook;
    5876    float                 rotation;
    5977
    60    // Vector                velocity;           //!< the velocity of the Spacecraft2D.
    61     Quaternion            direction;          //!< the direction of the Spacecraft2D.
    62     float                 travelSpeed;        //!< the current speed of the Hove (to make soft movement)
    63     float                 acceleration;       //!< the acceleration of the Spacecraft2D.
    64     float                 airFriction;        //!< AirFriction.
    65 
    66     float                 airViscosity;
    6778
    6879    ParticleEmitter*      burstEmitter;
Note: See TracChangeset for help on using the changeset viewer.