Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6987 in orxonox.OLD


Ignore:
Timestamp:
Feb 2, 2006, 6:24:50 PM (18 years ago)
Author:
bensch
Message:

trunk: some minor fixes

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/sound/ogg_player.cc

    r6872 r6987  
    4747}
    4848
    49 OggPlayer::~ OggPlayer()
    50 {
    51   this->release();
     49OggPlayer::~OggPlayer()
     50{
     51  //this->release();
    5252}
    5353
     
    8080  if((result = ov_open(oggFile, &oggStream, NULL, 0)) < 0)
    8181  {
    82     fclose(oggFile);
    83 
    8482    PRINTF(2)("Could not open Ogg stream. %s", errorString(result));
    8583    fclose(oggFile);
     
    204202bool OggPlayer::stream(ALuint buffer)
    205203{
     204  if (!this->trackLoaded)
     205    return false;
    206206  char pcm[BUFFER_SIZE];
    207207  int  size = 0;
  • trunk/src/story_entities/game_world_data.cc

    r6985 r6987  
    323323
    324324  if (this->music != NULL)
    325     delete this->music;
     325    this->setSoundTrack(NULL);
    326326  this->music = NULL;
    327327  /* stop the sound eninge */
     
    338338  if (this->music != NULL)
    339339    delete this->music;
    340 
    341   PRINTF(3)("Setting Sound Track to %s\n", name);
    342   this->music = (OggPlayer*)ResourceManager::getInstance()->load(name, OGG, RP_LEVEL);
    343 }
    344 
    345 
     340  this->music = NULL;
     341
     342  if (name != NULL)
     343  {
     344    PRINTF(3)("Setting Sound Track to %s\n", name);
     345    this->music = (OggPlayer*)ResourceManager::getInstance()->load(name, OGG, RP_LEVEL);
     346  }
     347}
     348
     349
  • trunk/src/world_entities/playable.cc

    r6986 r6987  
    162162  if (this->currentPlayer != NULL && player != NULL)
    163163  {
    164     printf("No Change in Playable\n");
    165164    return false;
    166165  }
     
    169168  if (this->currentPlayer != NULL && player == NULL)
    170169  {
    171     PRINTF(0)("Player gets ejected\n");
     170    PRINTF(4)("Player gets ejected\n");
    172171
    173172    // unsubscibe all events.
     
    192191  if (this->currentPlayer == NULL && player != NULL)
    193192  {
    194     PRINTF(0)("New Player gets inside\n");
     193    PRINTF(4)("New Player gets inside\n");
    195194    this->currentPlayer = player;
    196195    if (this->currentPlayer->getPlayable() != this)
     
    207206  }
    208207
    209   printf("none\n");
    210208  return false;
    211209}
  • trunk/src/world_entities/player.cc

    r6986 r6987  
    6161  if (this->playable != NULL)
    6262  {
    63     printf("Player gets ejected from Playable\n");
     63    PRINTF(4)("Player gets ejected from Playable\n");
    6464    this->hud.setEnergyWidget(NULL);
    6565    this->hud.setWeaponManager(NULL);
     
    7373  if (playable != NULL)
    7474  {
    75     printf("Enter new Playable\n");
     75    PRINTF(4)("Enter new Playable\n");
    7676      this->playable = playable;
    7777      this->hud.setEnergyWidget(this->playable->getHealthWidget());
     
    8282  }
    8383
    84   printf("no change\n");
    8584  return true;
    8685}
Note: See TracChangeset for help on using the changeset viewer.