[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src playturn.cpp
From: |
David White |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src playturn.cpp |
Date: |
Tue, 05 Apr 2005 17:36:32 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: David White <address@hidden> 05/04/05 21:36:31
Modified files:
src : playturn.cpp
Log message:
enabled :debug command when in a non-networked game
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/playturn.cpp.diff?tr1=1.353&tr2=1.354&r1=text&r2=text
Patches:
Index: wesnoth/src/playturn.cpp
diff -u wesnoth/src/playturn.cpp:1.353 wesnoth/src/playturn.cpp:1.354
--- wesnoth/src/playturn.cpp:1.353 Sun Mar 27 23:06:17 2005
+++ wesnoth/src/playturn.cpp Tue Apr 5 21:36:31 2005
@@ -1,4 +1,4 @@
-/* $Id: playturn.cpp,v 1.353 2005/03/27 23:06:17 gruikya Exp $ */
+/* $Id: playturn.cpp,v 1.354 2005/04/05 21:36:31 Sirp Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -949,11 +949,11 @@
if(current_paths_.routes.count(adj[n])) {
static const size_t NDIRECTIONS =
gamemap::location::NDIRECTIONS;
- int difference = std::abs(int(preferred - n));
+ int difference = abs(int(preferred - n));
if(difference > NDIRECTIONS/2) {
difference = NDIRECTIONS - difference;
}
- int second_difference = std::abs(int(second_preferred -
n));
+ int second_difference = abs(int(second_preferred - n));
if(second_difference > NDIRECTIONS/2) {
second_difference = NDIRECTIONS -
second_difference;
}
@@ -2450,6 +2450,8 @@
game_config::ignore_replay_errors = (data != "off") ? true :
false;
} else if(cmd == "n" && game_config::debug) {
throw end_level_exception(VICTORY);
+ } else if(cmd == "debug" && network::nconnections() == 0) {
+ game_config::debug = true;
} else if(game_config::debug && cmd == "unit") {
const unit_map::iterator i = current_unit();
if(i != units_.end()) {
- [Wesnoth-cvs-commits] wesnoth/src playturn.cpp,
David White <=