aboutsummaryrefslogtreecommitdiffstats
path: root/src/world.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/world.cpp')
-rw-r--r--src/world.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/world.cpp b/src/world.cpp
index f54af3e..b6149e8 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -22,6 +22,7 @@ using namespace std::literals::chrono_literals;
#include <components.hpp>
#include <player.hpp>
#include <weather.hpp>
+#include <particle.hpp>
// local library headers
#include <tinyxml2.h>
@@ -1156,7 +1157,11 @@ void WorldSystem::detect(entityx::TimeDelta dt)
} else {
loc.y = data[line].groundHeight - 0.001f * dt;
vel.y = 0;
- // TODO ground flag
+ if (!vel.grounded) {
+ vel.grounded = true;
+ game::engine.getSystem<ParticleSystem>()->addMultiple(20, ParticleType::SmallPoof,
+ [&](){ return vec2(loc.x + randGet() % static_cast<int>(dim.width * game::HLINE), loc.y);}, 500, 30);
+ }
}
}