Changeset 7221 in orxonox.OLD for trunk/src/world_entities/projectiles/projectile.cc
- Timestamp:
- Mar 15, 2006, 3:10:45 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/projectiles/projectile.cc
r7193 r7221 61 61 62 62 63 void Projectile::loadExplosionSound(const char*explosionSound)63 void Projectile::loadExplosionSound(const std::string& explosionSound) 64 64 { 65 65 if (this->explosionBuffer != NULL) 66 66 ResourceManager::getInstance()->unload(this->explosionBuffer); 67 67 68 else if ( explosionSound != NULL)68 else if (!explosionSound.empty()) 69 69 { 70 70 this->explosionBuffer = (SoundBuffer*)ResourceManager::getInstance()->load(explosionSound, WAV); 71 71 if (this->explosionBuffer != NULL) 72 72 { 73 PRINTF(4)("Loaded sound %s to Pickup: %s.\n", explosionSound , this->getName());73 PRINTF(4)("Loaded sound %s to Pickup: %s.\n", explosionSound.c_str(), this->getName()); 74 74 } 75 75 else 76 76 { 77 PRINTF(2)("Failed to load sound %s to explosion %s.\n.", explosionSound , this->getName());77 PRINTF(2)("Failed to load sound %s to explosion %s.\n.", explosionSound.c_str(), this->getName()); 78 78 } 79 79 } … … 83 83 84 84 85 void Projectile::loadEngineSound(const char*engineSound)85 void Projectile::loadEngineSound(const std::string& engineSound) 86 86 { 87 87 if (this->engineBuffer != NULL) 88 88 ResourceManager::getInstance()->unload(this->engineBuffer); 89 89 90 else if ( engineSound != NULL)90 else if (!engineSound.empty()) 91 91 { 92 92 this->engineBuffer = (SoundBuffer*)ResourceManager::getInstance()->load(engineSound, WAV); 93 93 if (this->engineBuffer != NULL) 94 94 { 95 PRINTF(4)("Loaded sound %s to Pickup: %s.\n", engineSound , this->getName());95 PRINTF(4)("Loaded sound %s to Pickup: %s.\n", engineSound.c_str(), this->getName()); 96 96 } 97 97 else 98 98 { 99 PRINTF(2)("Failed to load sound %s to engine %s.\n.", engineSound , this->getName());99 PRINTF(2)("Failed to load sound %s to engine %s.\n.", engineSound.c_str(), this->getName()); 100 100 } 101 101 }
Note: See TracChangeset
for help on using the changeset viewer.