summaryrefslogtreecommitdiff
path: root/src/game/game.cpp
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2018-04-12 21:12:28 +0200
committerPaweł Redman <pawel.redman@gmail.com>2018-04-12 21:13:35 +0200
commitd307234efb1e687bfac06d48b01eb56d748e8510 (patch)
tree911312b01583dc65b7204ae9a5093e15949e6642 /src/game/game.cpp
parenta5b20dcd57ddf7bdac8d9bce1aabf934badd837d (diff)
Refactor trace calls and remove the debug crap from the previous commit.
Diffstat (limited to 'src/game/game.cpp')
-rw-r--r--src/game/game.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/game/game.cpp b/src/game/game.cpp
index 4b9a9a3..8deadd6 100644
--- a/src/game/game.cpp
+++ b/src/game/game.cpp
@@ -251,31 +251,6 @@ void state_t::command(v2f_t x, int number)
if (!selected_units.size())
return;
- // debugging
- if (number == 666) {
- for (size_t i = 0; i < 100; i++) {
- v2f_t rad;
- world::trace_t best;
-
- best.hit = false;
- best.frac = 2.0f;
-
- rad = v2f_t::rad(i / 99.0f * 2.0f * M_PI);
-
- for (unit_t *unit : selected_units) {
- world::trace_t trace;
-
- trace = world::ray_v_rect(x, x + rad * 10, unit->cmodel.bounds);
- if (trace.frac < best.frac)
- best = trace;
- }
-
- debug_render->render_line(x, best.end, (best.hit ? sf::Color::Yellow : sf::Color::White));
- }
-
- return;
- }
-
snap[0] = std::round(x[0] - 0.5f) + 0.5f;
snap[1] = std::round(x[1] - 0.5f) + 0.5f;