Heightmap fix, texture fix, rotating crystals and enemy height to 0

This commit is contained in:
Dofensmirtsz
2016-06-21 23:31:43 +02:00
parent 0e99b9f719
commit 6306e8abd4
6 changed files with 7 additions and 3 deletions
+4
View File
@@ -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();
}
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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));
}
+1 -1
View File
@@ -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++;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 KiB

After

Width:  |  Height:  |  Size: 261 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 MiB

After

Width:  |  Height:  |  Size: 49 MiB