recv_data >> flags >> time;
recv_data >> x >> y >> z >> orientation;
@@ -174,52 +177,63 @@
if (flags & MOVEMENTFLAG_ONTRANSPORT)
{
// if we boarded a transport, add us to it
- if (!GetPlayer()->m_transport)
+ if ((GetPlayer()->m_transportGUID == 0) && (t_GUID !=0))
{
- // unmount before boarding
- _player->RemoveSpellsCausingAura(SPELL_AURA_MOUNTED);
+ if (!GetPlayer()->m_transport)
+ {
+ // unmount before boarding
+ _player->RemoveSpellsCausingAura(SPELL_AURA_MOUNTED);
- for (MapManager::TransportSet::iterator iter = MapManager::Instance().m_Transports.begin(); iter != MapManager::Instance().m_Transports.end(); ++iter)
- {
- if ((*iter)->GetGUID() == t_GUID)
+ for (MapManager::TransportSet::iterator iter = MapManager::Instance().m_Transports.begin(); iter != MapManager::Instance().m_Transports.end(); ++iter)
{
- GetPlayer()->m_transport = (*iter);
- (*iter)->AddPassenger(GetPlayer());
- break;
+ if ((*iter)->GetGUID() == t_GUID)
+ {
+ GetPlayer()->m_transport = (*iter);
+ (*iter)->AddPassenger(GetPlayer());
+ break;
+ }
}
}
+ GetPlayer()->m_transportGUID = t_GUID;
}
- GetPlayer()->m_transX = t_x;
- GetPlayer()->m_transY = t_y;
- GetPlayer()->m_transZ = t_z;
- GetPlayer()->m_transO = t_o;
- GetPlayer()->m_transTime = t_time;
+ if (t_GUID !=0)
+ {
+ GetPlayer()->m_transX = t_x;
+ GetPlayer()->m_transY = t_y;
+ GetPlayer()->m_transZ = t_z;
+ GetPlayer()->m_transO = t_o;
+ GetPlayer()->m_transTime = t_time;
+ }
}
- else if (GetPlayer()->m_transport) // if we were on a transport, leave
+ else if (GetPlayer()->m_transportGUID != 0)
{
- GetPlayer()->m_transport->RemovePassenger(GetPlayer());
- GetPlayer()->m_transport = NULL;
+ if (GetPlayer()->m_transport) // if we were on a transport, leave
+ {
+ GetPlayer()->m_transport->RemovePassenger(GetPlayer());
+ GetPlayer()->m_transport = NULL;
+ }
GetPlayer()->m_transX = 0.0f;
GetPlayer()->m_transY = 0.0f;
GetPlayer()->m_transZ = 0.0f;
GetPlayer()->m_transO = 0.0f;
GetPlayer()->m_transTime = 0;
+ GetPlayer()->m_transportGUID = 0;
}
void WorldSession::HandleMoveKnockBackAck( WorldPacket & recv_data )
{
- // CHECK_PACKET_SIZE(recv_data,?);
- sLog.outDebug("CMSG_MOVE_KNOCK_BACK_ACK");
- // Currently not used but maybe use later for recheck final player position
- // (must be at call same as into "recv_data >> x >> y >> z >> orientation;"
-
- /*
uint32 flags, time;
float x, y, z, orientation;
uint64 guid;
@@ -418,8 +527,10 @@
if(GetPlayer()->GetGUID()!=guid)
return;
@@ -397,7 +398,8 @@
static float m_MaxVisibleDistanceInFlight;
static float m_VisibleUnitGreyDistance;
static float m_VisibleObjectGreyDistance;
-
+ //movement anticheat enable flag
+ uint32 m_EnableMovementAnticheat;
// CLI command holder to be thread safe
ZThread::LockedQueue<CliCommandHolder*, ZThread::FastMutex> cliCmdQueue;
SqlResultQueue *m_resultQueue;
Index: src/mangosd/mangosd.conf.in
===================================================================
--- src/mangosd/mangosd.conf.in (revision 4609)
+++ src/mangosd/mangosd.conf.in (working copy)
@@ -451,6 +451,11 @@
# List of ids with delimiter ','
vmap.ignoreSpellIds = "7720"
+#Enable movement anticheat features
+#Default: 1 (enable)
+# 0 (disable)
+Anticheat.Movement = 1
+
# Subseqent kills of the same player decrease the amount of honor gained.
# Maximum number of times a user may kill another player in one day and get honor for it.
# Default: 10