Update of /cvsroot/wpdev/wolfpack/muls
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7222/muls
Modified Files:
maps.cpp
Log Message:
fixes for walking
fixes for maps
fixes for spawnregions
Index: maps.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/muls/maps.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** maps.cpp 19 Aug 2004 01:55:56 -0000 1.9
--- maps.cpp 27 Aug 2004 18:56:59 -0000 1.10
***************
*** 32,35 ****
--- 32,37 ----
#include "../defines.h"
#include "../items.h"
+ #include "../console.h"
+ #include "../log.h"
#include "../serverconfig.h"
***************
*** 115,118 ****
--- 117,121 ----
if ( !staticsfile.open( IO_ReadOnly ) )
throw wpFileNotFoundException( QString( "Couldn't open file %1" ).arg( statics ) );
+
staticsCache.setAutoDelete( true );
mapCache.setAutoDelete( true );
***************
*** 319,326 ****
d.insert( id, p );
return true;
! }
! catch ( wpFileNotFoundException& e )
! {
! qWarning( e.error() );
return false;
}
--- 322,327 ----
d.insert( id, p );
return true;
! } catch ( wpFileNotFoundException& e ) {
! Console::instance()->log(LOG_WARNING, e.error());
return false;
}
***************
*** 568,573 ****
{
const_iterator it = d.find( id );
! if ( it == d.end() )
! throw wpException( QString( "[cMaps::staticsIterator line %1] map id(%2) not registered!" ).arg( __LINE__ ).arg( id ) );
return StaticsIterator( x, y, it.data(), exact );
}
--- 569,576 ----
{
const_iterator it = d.find( id );
! if ( it == d.end() ) {
! Console::instance()->log(LOG_ERROR, QString( "[cMaps::staticsIterator line %1] map id(%2) not registered!\n" ).arg( __LINE__ ).arg( id ) );
! return StaticsIterator( x, y, 0, true );
! }
return StaticsIterator( x, y, it.data(), exact );
}
***************
*** 606,611 ****
baseY = y / 8;
pos = 0;
!
! if ( baseX < d->width && baseY < d->height )
load( d, x, y, exact );
}
--- 609,614 ----
baseY = y / 8;
pos = 0;
!
! if ( d && baseX < d->width && baseY < d->height )
load( d, x, y, exact );
}
|