wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src pathfind.cpp


From: David White
Subject: [Wesnoth-cvs-commits] wesnoth/src pathfind.cpp
Date: Sun, 23 Jan 2005 17:10:00 -0500

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     David White <address@hidden>    05/01/23 22:10:00

Modified files:
        src            : pathfind.cpp 

Log message:
        code cleanup for pathfinding where a unit has 0 total movement

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/pathfind.cpp.diff?tr1=1.57&tr2=1.58&r1=text&r2=text

Patches:
Index: wesnoth/src/pathfind.cpp
diff -u wesnoth/src/pathfind.cpp:1.57 wesnoth/src/pathfind.cpp:1.58
--- wesnoth/src/pathfind.cpp:1.57       Sun Jan 23 14:31:06 2005
+++ wesnoth/src/pathfind.cpp    Sun Jan 23 22:10:00 2005
@@ -1,4 +1,4 @@
-/* $Id: pathfind.cpp,v 1.57 2005/01/23 14:31:06 j_daniel Exp $ */
+/* $Id: pathfind.cpp,v 1.58 2005/01/23 22:10:00 Sirp Exp $ */
 /*
 Copyright (C) 2003 by David White <address@hidden>
 Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -630,11 +630,9 @@
        const int starting_movement = unit_.movement_left();
        int remaining_movement = starting_movement - current_cost;
        if (remaining_movement < 0) {
-               int total = unit_.total_movement();
+               const int total = unit_.total_movement();
                if (total != 0) {
                        remaining_movement = total - (-remaining_movement) % 
total;
-               } else {
-                       remaining_movement = -remaining_movement;
                }
        }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]