summaryrefslogtreecommitdiff
path: root/src/pathfinder.cpp
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2013-04-09 20:33:59 +0200
committerkwolekr <kwolekr@minetest.net>2013-04-10 16:50:24 -0400
commitdda2071cc083db2770044db85174a8629a7598b7 (patch)
tree67f717185dde8f7abea18f9944153bc57815a283 /src/pathfinder.cpp
parent6e4fdf37baaeaf1048210e5519822ebd68dd413b (diff)
downloadminetest-dda2071cc083db2770044db85174a8629a7598b7.tar.gz
minetest-dda2071cc083db2770044db85174a8629a7598b7.tar.bz2
minetest-dda2071cc083db2770044db85174a8629a7598b7.zip
fix bug in scriptapi line_of_sight
fix warnings for pathfinder debug traces
Diffstat (limited to 'src/pathfinder.cpp')
-rw-r--r--src/pathfinder.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/pathfinder.cpp b/src/pathfinder.cpp
index c7621177e..0d1cfe476 100644
--- a/src/pathfinder.cpp
+++ b/src/pathfinder.cpp
@@ -687,9 +687,8 @@ bool pathfinder::update_all_costs( v3s16 ipos,
if ((g_pos2.totalcost < 0) ||
(g_pos2.totalcost > new_cost)) {
- int old_cost = g_pos2.totalcost;
DEBUG_OUT(LVL "Pathfinder: updating path at: "<<
- PPOS(ipos2) << " from: " << old_cost << " to "<<
+ PPOS(ipos2) << " from: " << g_pos2.totalcost << " to "<<
new_cost << std::endl);
if (update_all_costs(ipos2,invert(directions[i]),
new_cost,level)) {
@@ -847,9 +846,8 @@ bool pathfinder::update_cost_heuristic( v3s16 ipos,
if ((g_pos2.totalcost < 0) ||
(g_pos2.totalcost > new_cost)) {
- int old_cost = g_pos2.totalcost;
DEBUG_OUT(LVL "Pathfinder: updating path at: "<<
- PPOS(ipos2) << " from: " << old_cost << " to "<<
+ PPOS(ipos2) << " from: " << g_pos2.totalcost << " to "<<
new_cost << " srcdir=" <<
PPOS(invert(direction))<< std::endl);
if (update_cost_heuristic(ipos2,invert(direction),