summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-12-26 03:40:31 +0100
committerAki <please@ignore.pl>2022-12-26 03:40:31 +0100
commit0f415a94e31f45fdba643e351e19798bbc6c2f20 (patch)
treeb9ba772891620a2d330b979dc2bdc0c9065ea6f9
parent5a1731154259909b5ba6168ecec080ec6e32d15a (diff)
downloadkurator-0f415a94e31f45fdba643e351e19798bbc6c2f20.zip
kurator-0f415a94e31f45fdba643e351e19798bbc6c2f20.tar.gz
kurator-0f415a94e31f45fdba643e351e19798bbc6c2f20.tar.bz2
Laser effect now hits the target a bit smoother
-rw-r--r--kurator/src/Battle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kurator/src/Battle.cpp b/kurator/src/Battle.cpp
index 6b3ac99..8cced8b 100644
--- a/kurator/src/Battle.cpp
+++ b/kurator/src/Battle.cpp
@@ -82,7 +82,7 @@ Battle::update(const float dt)
}
auto lines = registry.view<Line>();
for (auto&& [entity, line] : lines.each())
- line.position += 1.0 / line.duration * dt * time_factor;
+ line.position += (1.0 + line.hlength) / line.duration * dt * time_factor;
balance.update(registry);
ImGui::SetNextWindowPos({GetScreenWidth()/2.0f, GetScreenHeight()-100.0f}, ImGuiCond_Once, {0.5f, 0.5f});
ImGui::SetNextWindowSize({240.0f, 0.0f}, ImGuiCond_Once);