using base path value from Lua script

This commit is contained in:
devZoGok
2022-07-25 11:44:19 +03:00
parent 8d4d98cba2
commit 41aa789b1e
18 changed files with 75 additions and 62 deletions
+2 -2
View File
@@ -52,8 +52,8 @@ namespace battleship{
float angle = dirVec.getAngleBetween(Vector3(0, 0, -1));
angle = Quaternion(angle, upVec) * Vector3(0, 0, -1) == dirVec ? angle : -angle;
string p1 = PATH + "Sounds/" + unitData::name[id] + "s/" + projectileData::name[id][weaponTypeId] + ".ogg";
string p2 = PATH + "Sounds/Explosions/explosion03" + to_string(rand() % 4) + ".ogg";
string p1 = gm->getPath() + "Sounds/" + unitData::name[id] + "s/" + projectileData::name[id][weaponTypeId] + ".ogg";
string p2 = gm->getPath() + "Sounds/Explosions/explosion03" + to_string(rand() % 4) + ".ogg";
this->shotSfxBuffer = new sf::SoundBuffer();
this->explosionSfxBuffer=new sf::SoundBuffer();