Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5801
Modified Files:
ChangeLog commands.cpp walking.cpp wolfpack.sln
Log Message:
Walking fixes
Index: wolfpack.sln
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.sln,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** wolfpack.sln 21 Oct 2004 12:11:19 -0000 1.3
--- wolfpack.sln 27 Oct 2004 16:19:42 -0000 1.4
***************
*** 4,11 ****
EndProjectSection
EndProject
- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin", "plugin\plugin.vcproj", "{709E9DEC-CDB2-4383-8B2D-10631EA06774}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
- EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
--- 4,7 ----
***************
*** 21,30 ****
{766437DE-37EB-400E-BF08-4AB9B529C83D}.Web-Release.ActiveCfg = Web-Release|Win32
{766437DE-37EB-400E-BF08-4AB9B529C83D}.Web-Release.Build.0 = Web-Release|Win32
- {709E9DEC-CDB2-4383-8B2D-10631EA06774}.Debug.ActiveCfg = Debug|Win32
- {709E9DEC-CDB2-4383-8B2D-10631EA06774}.Debug.Build.0 = Debug|Win32
- {709E9DEC-CDB2-4383-8B2D-10631EA06774}.Release.ActiveCfg = Release|Win32
- {709E9DEC-CDB2-4383-8B2D-10631EA06774}.Release.Build.0 = Release|Win32
- {709E9DEC-CDB2-4383-8B2D-10631EA06774}.Web-Release.ActiveCfg = Release|Win32
- {709E9DEC-CDB2-4383-8B2D-10631EA06774}.Web-Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
--- 17,20 ----
Index: ChangeLog
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/ChangeLog,v
retrieving revision 1.124
retrieving revision 1.125
diff -C2 -d -r1.124 -r1.125
*** ChangeLog 27 Oct 2004 15:04:41 -0000 1.124
--- ChangeLog 27 Oct 2004 16:19:42 -0000 1.125
***************
*** 8,11 ****
--- 8,13 ----
- Stablemasters now remove the stabled pets from the follower list.
- Corpses now decay in multis too.
+ - Implemented a walktest command for testing walking.
+ - Fixed several other walking bugs.
Wolfpack 12.9.12 Beta (18. October 2004)
Index: walking.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/walking.cpp,v
retrieving revision 1.157
retrieving revision 1.158
diff -C2 -d -r1.157 -r1.158
*** walking.cpp 26 Oct 2004 18:37:34 -0000 1.157
--- walking.cpp 27 Oct 2004 16:19:42 -0000 1.158
***************
*** 136,141 ****
{
// 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) {
--- 136,141 ----
{
// If the items have the same top, the one with the surface flag has precedence
! int itemTopA = a.height + a.z;
! int itemTopB = b.height + b.z;
if (itemTopA == itemTopB) {
***************
*** 145,153 ****
if (b.height == 0 && b.walkable) {
! return true;
}
}
! return ( ( a.height + a.z ) > ( b.height + b.z ) );
}
};
--- 145,153 ----
if (b.height == 0 && b.walkable) {
! return false;
}
}
! return ( itemTopA > itemTopB );
}
};
***************
*** 335,339 ****
// Then we can as well just return false as while falling we would be
// blocked by that object
! if ( !item.walkable && !priviledged && itemTop < pos.z )
return false;
--- 335,339 ----
// Then we can as well just return false as while falling we would be
// blocked by that object
! if ( !item.walkable && !priviledged && itemTop <= pos.z )
return false;
***************
*** 425,428 ****
--- 425,432 ----
if ( ( item.z <= oldz ) && ( itemTop >= oldz + P_M_MAX_Z_BLOCKS / 2 ) )
return false;
+
+ // Is it at the new position ?
+ if ( ( item.z >= pos.z ) && ( item.z < pos.z + P_M_MAX_Z_BLOCKS ) )
+ return false;
}
Index: commands.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/commands.cpp,v
retrieving revision 1.269
retrieving revision 1.270
diff -C2 -d -r1.269 -r1.270
*** commands.cpp 22 Oct 2004 18:40:32 -0000 1.269
--- commands.cpp 27 Oct 2004 16:19:42 -0000 1.270
***************
*** 45,48 ****
--- 45,49 ----
#include "pythonscript.h"
#include "network/network.h"
+ #include "walking.h"
#include "dbdriver.h"
***************
*** 1287,1290 ****
--- 1288,1310 ----
/*
+ \command walktest
+ \description Checks if the character could walk into the direction he is facing if he was a npc.
+ \notes This command is very useful for testing npc movement as a staff member.
+ */
+ void commandWalkTest( cUOSocket* socket, const QString& /*command*/, const QStringList& /*args*/ ) throw()
+ {
+ Coord_cl newpos = socket->player()->pos();
+ newpos = Movement::instance()->calcCoordFromDir(socket->player()->direction(), newpos);
+
+ bool result = mayWalk(socket->player(), newpos);
+
+ if (!result) {
+ socket->sysMessage(tr("You may not walk in that direction."), 0x26);
+ } else {
+ socket->sysMessage(tr("You may walk in that direction. (New Z: %1)").arg(newpos.z), 0x3a);
+ }
+ }
+
+ /*
\command doorgen
\description Generate doors in passage ways.
***************
*** 1550,1553 ****
--- 1570,1574 ----
{ "STAFF", commandStaff },
{ "SPAWNREGION", commandSpawnRegion },
+ { "WALKTEST", commandWalkTest },
{ NULL, NULL }
};
|