Update of /cvsroot/gcblue/gcb_wx/src/ai
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1255/src/ai
Modified Files:
Nav.cpp
Log Message:
GCB 0.8.0 release
Index: Nav.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/ai/Nav.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Nav.cpp 29 Jul 2005 02:35:52 -0000 1.3
--- Nav.cpp 10 Sep 2005 21:47:38 -0000 1.4
***************
*** 110,113 ****
--- 110,118 ----
}
+ bool Nav::GetLoopState() const
+ {
+ return loop;
+ }
+
/**
* @return waypoint vector of GeoPoint
***************
*** 118,121 ****
--- 123,131 ----
}
+ void Nav::SetLoopState(bool state)
+ {
+ loop = state;
+ }
+
void Nav::Update(double t)
{
***************
*** 124,129 ****
if (currentWaypoint >= waypoints.size())
{
! EndTask();
! return;
}
--- 134,147 ----
if (currentWaypoint >= waypoints.size())
{
! if (loop)
! {
! currentWaypoint = 0;
! wxASSERT(waypoints.size() > 0);
! }
! else
! {
! EndTask();
! return;
! }
}
***************
*** 165,169 ****
long id_, double priority_, const std::string& taskName_)
: Task(platform_, bb, id_, priority_, taskName_),
! currentWaypoint(0)
{
wxASSERT(platform);
--- 183,188 ----
long id_, double priority_, const std::string& taskName_)
: Task(platform_, bb, id_, priority_, taskName_),
! currentWaypoint(0),
! loop(false)
{
wxASSERT(platform);
|