Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2014-12-16 23:07:13 +0000
committerStijn Buys <ingar@osirion.org>2014-12-16 23:07:13 +0000
commitab1f3d1fe9f376c1e6dac83e02e9b63211d1499b (patch)
tree4657b1bc909a1d756807a76fe7f456f7cff4ca13
parent029028b2e80d43497f4dd19c5aff17903b0a504f (diff)
Currected a bug where the waypoint number would always be 1 in error messages while parsing the [patrol] section.
-rw-r--r--src/game/base/patrol.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game/base/patrol.cc b/src/game/base/patrol.cc
index 78d2ebd..679b81e 100644
--- a/src/game/base/patrol.cc
+++ b/src/game/base/patrol.cc
@@ -81,10 +81,11 @@ void Patrol::set_faction(Faction *faction)
void Patrol::validate()
{
- int waypoint_counter = 1;
+ int waypoint_counter = 0;
for (WayPoints::iterator it = patrol_waypoints.begin(); it != patrol_waypoints.end(); ++it) {
WayPoint *waypoint = (*it);
+ ++waypoint_counter;
if (waypoint->target_label().size() == 0) {
con_warn << " Patrol '" << label() << "' WayPoint " << waypoint_counter << " has no target" << "'\n";