From 357f370e4f93979cfd6eb66eae76acc28c1febce Mon Sep 17 00:00:00 2001 From: ViktorLjung Date: Fri, 14 Mar 2014 01:09:30 +0100 Subject: [PATCH] =?UTF-8?q?fixade=20de=20sm=C3=A5=20objekten?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Escape-the-Dawn/Systems/LevelGenerationSystem.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Escape-the-Dawn/Systems/LevelGenerationSystem.cpp b/Escape-the-Dawn/Systems/LevelGenerationSystem.cpp index 0804afc..cd2e5f2 100644 --- a/Escape-the-Dawn/Systems/LevelGenerationSystem.cpp +++ b/Escape-the-Dawn/Systems/LevelGenerationSystem.cpp @@ -38,7 +38,7 @@ void Systems::LevelGenerationSystem::SpawnObstacle() if(typeRandom >= 0 && typeRandom < 2) // Mountain stuff :D { m_World->SetProperty(ent, "Name", std::string("Obstacle")); - float scale = (float)(rand() % 1000) / 250; + float scale = 1.0f + (float)(rand() % 1000) / 250; transform->Scale = glm::vec3(scale); bounds->VolumeVector = glm::vec3(9, 12, 7); bounds->Origin = glm::vec3(1,11,-1); @@ -47,7 +47,7 @@ void Systems::LevelGenerationSystem::SpawnObstacle() else if(typeRandom >= 2 && typeRandom < 5) // Single Mountain :D { m_World->SetProperty(ent, "Name", std::string("Obstacle")); - float scale = (float)(rand() % 1000) / 200; + float scale = 1.0f + (float)(rand() % 1000) / 200; transform->Scale = glm::vec3(scale); bounds->VolumeVector = glm::vec3(3.5f, 7.5f, 3.5f); bounds->Origin = glm::vec3(0,7.5f,0); @@ -65,7 +65,6 @@ void Systems::LevelGenerationSystem::SpawnObstacle() if(typeRandom >= 8 && typeRandom < 10) { m_World->SetProperty(ent, "Name", std::string("PowerUp")); - float scale = (float)(rand() % 1000) / 100; bounds->VolumeVector = glm::vec3(4, 4, 4); bounds->Origin = glm::vec3(0,4,0);