Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27959
Modified Files:
npc.cpp npc.h
Log Message:
hopeful crashfix for npc pathfinding for broken STL implementations.
Index: npc.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/npc.h,v
retrieving revision 1.60
retrieving revision 1.61
diff -C2 -d -r1.60 -r1.61
*** npc.h 24 Sep 2004 04:47:37 -0000 1.60
--- npc.h 28 Sep 2004 09:48:56 -0000 1.61
***************
*** 33,37 ****
// library includes
! #include <deque>
// wolfpack includes
--- 33,37 ----
// library includes
! #include <qvaluelist.h>
// wolfpack includes
***************
*** 260,264 ****
// A* calculated path which the NPC walks on.
! std::deque<Coord_cl> path_;
// NPC AI interface
--- 260,264 ----
// A* calculated path which the NPC walks on.
! QValueList<Coord_cl> path_;
// NPC AI interface
Index: npc.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/npc.cpp,v
retrieving revision 1.116
retrieving revision 1.117
diff -C2 -d -r1.116 -r1.117
*** npc.cpp 19 Sep 2004 23:41:00 -0000 1.116
--- npc.cpp 28 Sep 2004 09:48:52 -0000 1.117
***************
*** 903,907 ****
{
Coord_cl ret;
! std::deque<Coord_cl>::const_iterator it = path_.begin();
if (it != path_.end())
--- 903,907 ----
{
Coord_cl ret;
! QValueList<Coord_cl>::const_iterator it = path_.begin();
if (it != path_.end())
***************
*** 929,933 ****
void cNPC::popMove( void )
{
! path_.pop_front();
}
--- 929,935 ----
void cNPC::popMove( void )
{
! if (!path_.empty()) {
! path_.pop_front();
! }
}
***************
*** 939,944 ****
bool cNPC::hasPath( void )
{
! std::deque<Coord_cl>::const_iterator it = path_.begin();
! return it != path_.end();
}
--- 941,945 ----
bool cNPC::hasPath( void )
{
! return !path_.isEmpty();
}
|