Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11272
Modified Files:
ChangeLog basechar.cpp player.cpp targetrequests.cpp
walking.cpp world.cpp
Log Message:
bugfixes
Index: basechar.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basechar.cpp,v
retrieving revision 1.156
retrieving revision 1.157
diff -C2 -d -r1.156 -r1.157
*** basechar.cpp 30 Sep 2004 12:34:10 -0000 1.156
--- basechar.cpp 1 Oct 2004 16:32:52 -0000 1.157
***************
*** 2516,2521 ****
switch ( body_ )
{
- case 0x004E:
- case 0x0050:
case 0x003A:
case 0x0039:
--- 2516,2519 ----
***************
*** 2577,2580 ****
--- 2575,2582 ----
if ( objectType() == enNPC && dynamic_cast<P_NPC>( this )->owner() == pChar )
source->sendContainer( getBackpack() );
+ break;
+
+ default:
+ break;
};
}
Index: ChangeLog
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/ChangeLog,v
retrieving revision 1.88
retrieving revision 1.89
diff -C2 -d -r1.88 -r1.89
*** ChangeLog 1 Oct 2004 15:15:56 -0000 1.88
--- ChangeLog 1 Oct 2004 16:32:52 -0000 1.89
***************
*** 12,15 ****
--- 12,19 ----
- Fixed base definitions for multis.
- Fixed items in multis being lost after two saves.
+ - Fixed issues with walking (especially stairs).
+ - Fixed bug #0000323. (World time not being loaded with binary saves)
+ - Fixed bug #0000335. (Riding liches + toads)
+ - Fixed bug #0000340. (Showing unicode properties crashes the server)
Wolfpack 12.9.11 Beta (26. September 2004)
Index: player.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/player.cpp,v
retrieving revision 1.133
retrieving revision 1.134
diff -C2 -d -r1.133 -r1.134
*** player.cpp 22 Sep 2004 17:14:11 -0000 1.133
--- player.cpp 1 Oct 2004 16:32:53 -0000 1.134
***************
*** 476,480 ****
pMountItem->setColor( pMount->skin() );
! switch ( static_cast<unsigned short>( pMount->body() & 0x00FF ) )
{
case 0xC8:
--- 476,480 ----
pMountItem->setColor( pMount->skin() );
! switch ( pMount->body() )
{
case 0xC8:
Index: targetrequests.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/targetrequests.cpp,v
retrieving revision 1.104
retrieving revision 1.105
diff -C2 -d -r1.104 -r1.105
*** targetrequests.cpp 24 Sep 2004 04:47:38 -0000 1.104
--- targetrequests.cpp 1 Oct 2004 16:32:53 -0000 1.105
***************
*** 137,141 ****
else
{
! socket->sysMessage( tr( "'%1' is '%2'" ).arg( key ).arg( PyString_AsString( PyObject_Str( result ) ) ) );
Py_DECREF( result );
}
--- 137,149 ----
else
{
! if (PyUnicode_Check(result) || PyString_Check(result)) {
! socket->sysMessage( tr( "'%1' is '%2'" ).arg( key ).arg( Python2QString(result) ) );
! } else {
! PyObject *repr = PyObject_Str(result);
! QString value = Python2QString(repr);
! socket->sysMessage( tr( "'%1' is '%2'" ).arg( key ).arg( value ) );
! Py_XDECREF(repr);
! }
!
Py_DECREF( result );
}
Index: walking.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/walking.cpp,v
retrieving revision 1.151
retrieving revision 1.152
diff -C2 -d -r1.151 -r1.152
*** walking.cpp 20 Sep 2004 00:16:20 -0000 1.151
--- walking.cpp 1 Oct 2004 16:32:53 -0000 1.152
***************
*** 135,138 ****
--- 135,152 ----
bool operator()( stBlockItem a, stBlockItem b )
{
+ // If the items have the same top, the one with the surface flag has precedence
+ unsigned int itemTopA = a.height + a.z;
+ unsigned int itemTopB = b.height + b.z;
+
+ if (itemTopA == itemTopB) {
+ if (a.height == 0 && a.walkable) {
+ return true;
+ }
+
+ if (b.height == 0 && b.walkable) {
+ return true;
+ }
+ }
+
return ( ( a.height + a.z ) > ( b.height + b.z ) );
}
***************
*** 193,197 ****
// If we are a stair only the half height counts (round up)
if ( tTile.flag2 & 0x04 )
! staticBlock.height = ( Q_UINT8 ) ( ( tTile.height + 1 ) / 2 );
else
staticBlock.height = tTile.height;
--- 207,211 ----
// If we are a stair only the half height counts (round up)
if ( tTile.flag2 & 0x04 )
! staticBlock.height = ( Q_UINT8 ) ( ( tTile.height ) / 2 );
else
staticBlock.height = tTile.height;
***************
*** 233,237 ****
stBlockItem blockItem;
! blockItem.height = tTile.height;
blockItem.z = pItem->pos().z;
--- 247,251 ----
stBlockItem blockItem;
! blockItem.height = (tTile.flag2 & 0x04) ? (tTile.height / 2) : tTile.height;
blockItem.z = pItem->pos().z;
***************
*** 265,269 ****
stBlockItem blockItem;
! blockItem.height = tTile.height;
blockItem.z = pItem->pos().z + multi[j].z;
--- 279,283 ----
stBlockItem blockItem;
! blockItem.height = (tTile.flag2 & 0x04) ? (tTile.height / 2) : tTile.height;
blockItem.z = pItem->pos().z + multi[j].z;
***************
*** 312,315 ****
--- 326,335 ----
Q_INT8 itemTop = ( item.z + item.height );
+ // If we found something to step on and the next tile
+ // below would block us, use the good one instead
+ if (found && (itemTop > pos.z - P_M_MAX_Z_BLOCKS || !item.walkable)) {
+ break;
+ }
+
// If we encounter any object with itemTop <= pos.z which is NOT walkable
// Then we can as well just return false as while falling we would be
***************
*** 325,337 ****
// of any item
if ( itemTop < pos.z + P_M_MAX_Z_CLIMB && itemTop >= pos.z - P_M_MAX_Z_FALL ) {
pos.z = itemTop;
found = true;
! break;
// Climbing maptiles is 5 tiles easier
} else if ( item.maptile && itemTop < pos.z + P_M_MAX_Z_CLIMB + 5 && itemTop >= pos.z - P_M_MAX_Z_FALL ) {
pos.z = itemTop;
found = true;
break;
} else if ( itemTop < pos.z ) {
pos.z = itemTop;
found = true;
--- 345,381 ----
// of any item
if ( itemTop < pos.z + P_M_MAX_Z_CLIMB && itemTop >= pos.z - P_M_MAX_Z_FALL ) {
+ // We already found something to step on above.
+ // See if it's easier to step down.
+ if (found && abs(oldz - pos.z) < abs(oldz - itemTop)) {
+ break;
+ }
+
pos.z = itemTop;
found = true;
!
! if (item.height > 1) {
! break;
! }
!
! // break; - We can't break here anymore since we have to check if the ground would be easier
! // to step on
// Climbing maptiles is 5 tiles easier
} else if ( item.maptile && itemTop < pos.z + P_M_MAX_Z_CLIMB + 5 && itemTop >= pos.z - P_M_MAX_Z_FALL ) {
+ // We already found something to step on above.
+ // See if it's easier to step down.
+ if (found && abs(oldz - pos.z) < abs(oldz - itemTop)) {
+ break;
+ }
+
pos.z = itemTop;
found = true;
break;
} else if ( itemTop < pos.z ) {
+ // We already found something to step on above.
+ // See if it's easier to step down.
+ if (found && abs(oldz - pos.z) < abs(oldz - itemTop)) {
+ break;
+ }
+
pos.z = itemTop;
found = true;
***************
*** 375,383 ****
// npcs stop wandering through the walls of multis. I am curious if this code
// has other (negative) affects besides that.
! if ( ( item.z > oldz ) && ( item.z < oldz + P_M_MAX_Z_BLOCKS ) )
return false;
// Or does it spread the whole range ?
! if ( ( item.z <= oldz ) && ( itemTop >= oldz + P_M_MAX_Z_BLOCKS ) )
return false;
}
--- 419,427 ----
// npcs stop wandering through the walls of multis. I am curious if this code
// has other (negative) affects besides that.
! if ( ( item.z > oldz ) && ( item.z < oldz + P_M_MAX_Z_BLOCKS / 2 ) )
return false;
// Or does it spread the whole range ?
! if ( ( item.z <= oldz ) && ( itemTop >= oldz + P_M_MAX_Z_BLOCKS / 2 ) )
return false;
}
Index: world.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/world.cpp,v
retrieving revision 1.130
retrieving revision 1.131
diff -C2 -d -r1.130 -r1.131
*** world.cpp 25 Sep 2004 21:15:46 -0000 1.130
--- world.cpp 1 Oct 2004 16:32:53 -0000 1.131
***************
*** 533,536 ****
--- 533,542 ----
}
}
+
+ // load server time from db
+ QString db_time;
+ QString default_time = Config::instance()->getString( "General", "UO Time", "", true );
+ getOption( "worldtime", db_time, default_time );
+ UoTime::instance()->setMinutes( db_time.toInt() );
}
|