diff --git a/CrystalPoint.vcxproj b/CrystalPoint.vcxproj
index f1d145e..35c0b8b 100644
--- a/CrystalPoint.vcxproj
+++ b/CrystalPoint.vcxproj
@@ -219,8 +219,7 @@
-
-
+
diff --git a/CrystalPoint.vcxproj.filters b/CrystalPoint.vcxproj.filters
index 7f1d60c..1afaf10 100644
--- a/CrystalPoint.vcxproj.filters
+++ b/CrystalPoint.vcxproj.filters
@@ -207,16 +207,13 @@
Resource Files
-
- Resource Files
-
Resource Files
-
+
Resource Files
-
+
Resource Files
diff --git a/Enemy.cpp b/Enemy.cpp
index df5107a..f747679 100644
--- a/Enemy.cpp
+++ b/Enemy.cpp
@@ -27,10 +27,9 @@ Enemy::Enemy(const std::string &fileName,
Enemy::~Enemy()
{
+ CrystalPoint::GetSoundSystem().UnloadSound(hit_sound_id);
if (model)
Model::unload(model);
-
- CrystalPoint::GetSoundSystem().UnloadSound(hit_sound_id);
}
void Enemy::draw()
@@ -106,11 +105,6 @@ void Enemy::update(float delta)
else
{
attack = true;
- if (music->IsPlaying() == true)
- {
-// music->Pause();
- music->Stop();
- }
}
rotation.y = atan2f(dx, dz) * 180 / M_PI;
diff --git a/WAVE/ghostEnemy.wav b/WAVE/ghostEnemy.wav
index ccbd83d..d69f976 100644
Binary files a/WAVE/ghostEnemy.wav and b/WAVE/ghostEnemy.wav differ
diff --git a/WAVE/test1.wav b/WAVE/test1.wav
deleted file mode 100644
index e8e4fb8..0000000
Binary files a/WAVE/test1.wav and /dev/null differ
diff --git a/WAVE/test2.wav b/WAVE/world1.wav
similarity index 60%
rename from WAVE/test2.wav
rename to WAVE/world1.wav
index 364ff42..0d99798 100644
Binary files a/WAVE/test2.wav and b/WAVE/world1.wav differ
diff --git a/World.cpp b/World.cpp
index 79e0d46..9bc5d49 100644
--- a/World.cpp
+++ b/World.cpp
@@ -314,8 +314,12 @@ void World::update(float elapsedTime)
count++;
}
- if(remove)
+ if (remove)
+ {
+ delete enemies[count];
enemies.erase(enemies.begin() + count);
+ }
+
skybox->update(elapsedTime, maxEnemies - enemies.size(), maxEnemies);
diff --git a/worlds/rock.json b/worlds/rock.json
index a62b3c0..c027630 100644
--- a/worlds/rock.json
+++ b/worlds/rock.json
@@ -3,7 +3,7 @@
"heightmap": "worlds/rockHeightmap.png",
"texture": "worlds/rockStone2.png",
"skybox": "skyboxes/water/",
- "music": "WAVE/test2.wav",
+ "music": "WAVE/world1.wav",
"object-templates": [
{
"color": 50,
@@ -95,7 +95,7 @@
"file": "models/squid/Blooper.obj",
"pos": [ 20, 5, 10 ],
"scale": 0.01,
- "music": "WAVE/enemy.wav"
+ "music": "WAVE/ghostEnemy.wav"
}],
"crystal": {
"full texture": "models/crystal/Crystal.obj",
diff --git a/worlds/small.json b/worlds/small.json
index 528b74f..1f0a008 100644
--- a/worlds/small.json
+++ b/worlds/small.json
@@ -9,7 +9,7 @@
"collision": true
}
],
- "music": "WAVE/test1.wav"
+ "music": "WAVE/world1.wav"
},
"player": {
"startposition": [ 20, 5, 20 ]