diff --git a/Crystal.cpp b/Crystal.cpp index c1f4957..fee4d5c 100644 --- a/Crystal.cpp +++ b/Crystal.cpp @@ -18,6 +18,8 @@ Crystal::Crystal(const std::string & filled, const std::string & empty, const Ve sound_id = CrystalPoint::GetSoundSystem().LoadSound("WAVE/Crystal.wav", false); music = CrystalPoint::GetSoundSystem().GetSound(sound_id); music->SetPos(position, Vec3f()); + + crystalRot = 0; } Crystal::~Crystal() @@ -38,6 +40,8 @@ Crystal::~Crystal() void Crystal::draw() { + crystalRot -= 3.0f; + rotation = Vec3f(0, crystalRot, 0); Entity::draw(); } diff --git a/Crystal.h b/Crystal.h index 5dbc03e..5158785 100644 --- a/Crystal.h +++ b/Crystal.h @@ -10,7 +10,7 @@ public: Crystal(const std::string &filled, const std::string &empty, const Vec3f &position, Vec3f &rotation, const float &scale); ~Crystal(); - + float crystalRot; bool isFilled; void draw(); void collide(); diff --git a/HeightMap.cpp b/HeightMap.cpp index cadef01..d42e7c6 100644 --- a/HeightMap.cpp +++ b/HeightMap.cpp @@ -49,7 +49,7 @@ HeightMap::HeightMap(const std::string &file, World* world) { int offsets[4][2] = { { 0, 0 },{ 1, 0 },{ 1, 1 },{ 0, 1 } }; - if (valueAt(x, y, GREEN) > 0) + if (valueAt(x, y, GREEN) > 5) { world->addLevelObject(new LevelObject(world->getObjectFromValue(valueAt(x, y, GREEN)).first, Vec3f(x, heightAt(x, y), y), Vec3f(0, 0, 0), 1, world->getObjectFromValue(valueAt(x, y, GREEN)).second)); } diff --git a/World.cpp b/World.cpp index 449c427..b706b13 100644 --- a/World.cpp +++ b/World.cpp @@ -319,7 +319,7 @@ void World::update(float elapsedTime) continue; } } - enemy->position.y = getHeight(enemy->position.x, enemy->position.z) + 2.0f; + enemy->position.y = getHeight(enemy->position.x, enemy->position.z); if(!remove) count++; diff --git a/worlds/rockHeightmap.png b/worlds/rockHeightmap.png index e392b6d..4f967be 100644 Binary files a/worlds/rockHeightmap.png and b/worlds/rockHeightmap.png differ diff --git a/worlds/rockStone.png b/worlds/rockStone.png index 40bddf4..1a83f43 100644 Binary files a/worlds/rockStone.png and b/worlds/rockStone.png differ