Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7455
Modified Files:
player.cpp walking.cpp world.cpp
Log Message:
I did some value conversion warning fixes.
Index: player.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/player.cpp,v
retrieving revision 1.129
retrieving revision 1.130
diff -C2 -d -r1.129 -r1.130
*** player.cpp 7 Sep 2004 03:21:46 -0000 1.129
--- player.cpp 9 Sep 2004 02:36:24 -0000 1.130
***************
*** 1776,1779 ****
unsigned int cPlayer::maxWeight() {
! return 40 + strength_ * 3.5;
}
--- 1776,1779 ----
unsigned int cPlayer::maxWeight() {
! return (unsigned int)( 40 + strength_ * 3.5 );
}
Index: walking.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/walking.cpp,v
retrieving revision 1.147
retrieving revision 1.148
diff -C2 -d -r1.147 -r1.148
*** walking.cpp 7 Sep 2004 22:23:14 -0000 1.147
--- walking.cpp 9 Sep 2004 02:36:24 -0000 1.148
***************
*** 725,729 ****
// Calculate the stones we weight too much
! int overWeight = pChar->weight() - pChar->maxWeight();
bool mounted = pChar->atLayer(cBaseChar::Mount) != 0;
bool update = false;
--- 725,729 ----
// Calculate the stones we weight too much
! int overWeight = ( int )( pChar->weight() - pChar->maxWeight() );
bool mounted = pChar->atLayer(cBaseChar::Mount) != 0;
bool update = false;
Index: world.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/world.cpp,v
retrieving revision 1.125
retrieving revision 1.126
diff -C2 -d -r1.125 -r1.126
*** world.cpp 8 Sep 2004 18:00:59 -0000 1.125
--- world.cpp 9 Sep 2004 02:36:24 -0000 1.126
***************
*** 523,527 ****
// post process all loaded objects
QPtrList<PersistentObject>::const_iterator cit(objects.begin());
!
while (cit != objects.end()) {
(*cit)->postload(reader.version());
--- 523,527 ----
// post process all loaded objects
QPtrList<PersistentObject>::const_iterator cit(objects.begin());
!
while (cit != objects.end()) {
(*cit)->postload(reader.version());
***************
*** 577,581 ****
QString db_version;
getOption("db_version", db_version, "7");
!
if (db_version.toInt() != DATABASE_VERSION) {
cPythonScript *script = ScriptManager::instance()->getGlobalHook(EVENT_UPDATEDATABASE);
--- 577,581 ----
QString db_version;
getOption("db_version", db_version, "7");
!
if (db_version.toInt() != DATABASE_VERSION) {
cPythonScript *script = ScriptManager::instance()->getGlobalHook(EVENT_UPDATEDATABASE);
***************
*** 587,591 ****
bool result = script->callEventHandler(EVENT_UPDATEDATABASE, args);
Py_DECREF(args);
!
if (!result) {
throw wpException(QString("Unable to load world database. Version mismatch: %1 != %2.").arg(db_version.toInt()).arg(DATABASE_VERSION));
--- 587,591 ----
bool result = script->callEventHandler(EVENT_UPDATEDATABASE, args);
Py_DECREF(args);
!
if (!result) {
throw wpException(QString("Unable to load world database. Version mismatch: %1 != %2.").arg(db_version.toInt()).arg(DATABASE_VERSION));
***************
*** 762,766 ****
pChar->flagUnchanged(); // We've just loaded, nothing changes
}
!
// post process all loaded objects
// Note from DarkStorm: I THINK it's important to do this before
--- 762,766 ----
pChar->flagUnchanged(); // We've just loaded, nothing changes
}
!
// post process all loaded objects
// Note from DarkStorm: I THINK it's important to do this before
***************
*** 768,772 ****
// list that are already deleted.
QPtrList<PersistentObject>::const_iterator cit(objects.begin());
!
while (cit != objects.end()) {
(*cit)->postload(0);
--- 768,772 ----
// list that are already deleted.
QPtrList<PersistentObject>::const_iterator cit(objects.begin());
!
while (cit != objects.end()) {
(*cit)->postload(0);
***************
*** 783,787 ****
deleteItems.clear();
}
!
// Load SpawnRegion information
cDBResult result = PersistentBroker::instance()->query( "SELECT spawnregion,serial FROM spawnregions;" );
--- 783,787 ----
deleteItems.clear();
}
!
// Load SpawnRegion information
cDBResult result = PersistentBroker::instance()->query( "SELECT spawnregion,serial FROM spawnregions;" );
***************
*** 827,833 ****
loadSQL( objects );
}
-
!
unsigned int duration = getNormalizedTime() - loadStart;
--- 827,833 ----
loadSQL( objects );
}
!
!
unsigned int duration = getNormalizedTime() - loadStart;
***************
*** 1052,1056 ****
void cWorld::getOption( const QString& name, QString& value, const QString fallback )
{
! QMap<QString, QString>::iterator it = options.find(name);
if (it == options.end()) {
value = fallback;
--- 1052,1056 ----
void cWorld::getOption( const QString& name, QString& value, const QString fallback )
{
! QMap<QString, QString>::iterator it = options.find(name);
if (it == options.end()) {
value = fallback;
***************
*** 1296,1300 ****
QDate date;
QTime time;
!
// Length has to be -YYYYMMDD-HHMM (14 Characters)
if (timestamp.length() != 14) {
--- 1296,1300 ----
QDate date;
QTime time;
!
// Length has to be -YYYYMMDD-HHMM (14 Characters)
if (timestamp.length() != 14) {
***************
*** 1315,1319 ****
date.setYMD(year, month, day);
time.setHMS(hour, minute, 0);
!
backups.insert(QDateTime(date, time), *sit);
}
--- 1315,1319 ----
date.setYMD(year, month, day);
time.setHMS(hour, minute, 0);
!
backups.insert(QDateTime(date, time), *sit);
}
***************
*** 1333,1337 ****
// Check if we need to remove a previous backup
QMap<QDateTime, QString> backups = listBackups(filename);
!
if (backups.count() >= count) {
// Remove the oldest backup
--- 1333,1337 ----
// Check if we need to remove a previous backup
QMap<QDateTime, QString> backups = listBackups(filename);
!
if (backups.count() >= count) {
// Remove the oldest backup
***************
*** 1399,1403 ****
gzwrite(output, buffer, readSize);
}
!
input.close();
gzclose(output);
--- 1399,1403 ----
gzwrite(output, buffer, readSize);
}
!
input.close();
gzclose(output);
***************
*** 1483,1485 ****
return ( p->it++ )->second;
! }
\ No newline at end of file
--- 1483,1485 ----
return ( p->it++ )->second;
! }
|