Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp
- index 4650e04..b34ea79 100644
- --- a/src/game/MovementHandler.cpp
- +++ b/src/game/MovementHandler.cpp
- @@ -31,7 +31,11 @@
- #include "WaypointMovementGenerator.h"
- #include "InstanceSaveMgr.h"
- #include "ObjectMgr.h"
- +#include "World.h"
- +/*Movement anticheat DEBUG defines */
- +//#define MOVEMENT_ANTICHEAT_DEBUG true
- +/*end Movement anticheate defines*/
- void WorldSession::HandleMoveWorldportAckOpcode( WorldPacket & /*recv_data*/ )
- {
- sLog.outDebug( "WORLD: got MSG_MOVE_WORLDPORT_ACK." );
- @@ -53,6 +57,9 @@ void WorldSession::HandleMoveWorldportAckOpcode()
- LogoutPlayer(false);
- return;
- }
- + //movement anticheat
- + GetPlayer()->m_anti_JustTeleported = 1;
- + //end movement anticheat
- // get the destination map entry, not the current one, this will fix homebind and reset greeting
- MapEntry const* mEntry = sMapStore.LookupEntry(loc.mapid);
- @@ -216,8 +223,12 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
- Player *plMover = mover->GetTypeId()==TYPEID_PLAYER ? (Player*)mover : NULL;
- // ignore, waiting processing in WorldSession::HandleMoveWorldportAckOpcode and WorldSession::HandleMoveTeleportAck
- - if(plMover && plMover->IsBeingTeleported())
- + if(plMover && plMover->IsBeingTeleported()){
- + // movement anticheat
- + plMover->m_anti_JustTeleported = 1;
- + // end movement anticheat
- return;
- + }
- /* extract packet */
- MovementInfo movementInfo;
- @@ -239,43 +250,63 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
- {
- // transports size limited
- // (also received at zeppelin leave by some reason with t_* as absolute in continent coordinates, can be safely skipped)
- - if( movementInfo.t_x > 50 || movementInfo.t_y > 50 || movementInfo.t_z > 50 )
- + if( movementInfo.t_x > 60 || movementInfo.t_y > 60 || movementInfo.t_x < -60 || movementInfo.t_y < -60 )
- return;
- if( !MaNGOS::IsValidMapCoord(movementInfo.x+movementInfo.t_x, movementInfo.y + movementInfo.t_y,
- movementInfo.z + movementInfo.t_z, movementInfo.o + movementInfo.t_o) )
- return;
- - // if we boarded a transport, add us to it
- - if (plMover && !plMover->m_transport)
- + if (plMover && plMover->m_anti_TransportGUID == 0 && (movementInfo.t_guid !=0))
- {
- - // elevators also cause the client to send MOVEMENTFLAG_ONTRANSPORT - just unmount if the guid can be found in the transport list
- - for (MapManager::TransportSet::const_iterator iter = MapManager::Instance().m_Transports.begin(); iter != MapManager::Instance().m_Transports.end(); ++iter)
- + // if we boarded a transport, add us to it
- + if (plMover && !plMover->m_transport)
- {
- - if ((*iter)->GetGUID() == movementInfo.t_guid)
- + // elevators also cause the client to send MOVEMENTFLAG_ONTRANSPORT - just unmount if the guid can be found in the transport list
- + for (MapManager::TransportSet::const_iterator iter = MapManager::Instance().m_Transports.begin(); iter != MapManager::Instance().m_Transports.end(); ++iter)
- {
- - plMover->m_transport = (*iter);
- - (*iter)->AddPassenger(plMover);
- - break;
- + if ((*iter)->GetGUID() == movementInfo.t_guid)
- + {
- + plMover->m_transport = (*iter);
- + (*iter)->AddPassenger(plMover);
- + break;
- + }
- }
- }
- + //movement anticheat;
- + //Correct finding GO guid in DB (thanks to GriffonHeart)
- + GameObject *obj = HashMapHolder<GameObject>::Find(movementInfo.t_guid);
- + if(obj)
- + plMover->m_anti_TransportGUID = obj->GetDBTableGUIDLow();
- + else
- + plMover->m_anti_TransportGUID = GUID_LOPART(movementInfo.t_guid);
- + // end movement anticheat
- + }
- + } else if (plMover && plMover->m_anti_TransportGUID != 0){
- + if (plMover && plMover->m_transport) // if we were on a transport, leave
- + {
- + plMover->m_transport->RemovePassenger(plMover);
- + plMover->m_transport = NULL;
- }
- - }
- - else if (plMover && plMover->m_transport) // if we were on a transport, leave
- - {
- - plMover->m_transport->RemovePassenger(plMover);
- - plMover->m_transport = NULL;
- movementInfo.t_x = 0.0f;
- movementInfo.t_y = 0.0f;
- movementInfo.t_z = 0.0f;
- movementInfo.t_o = 0.0f;
- movementInfo.t_time = 0;
- movementInfo.t_seat = -1;
- + plMover->m_anti_TransportGUID = 0;
- }
- // fall damage generation (ignore in flight case that can be triggered also at lags in moment teleportation to another map).
- if (opcode == MSG_MOVE_FALL_LAND && plMover && !plMover->isInFlight())
- + {
- + //movement anticheat
- + plMover->m_anti_JustJumped = 0;
- + plMover->m_anti_JumpBaseZ = 0;
- + //end movement anticheat
- plMover->HandleFall(movementInfo);
- + }
- +
- if (plMover && (movementInfo.HasMovementFlag(MOVEMENTFLAG_SWIMMING) != plMover->IsInWater()))
- {
- @@ -284,8 +315,299 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
- }
- /*----------------------*/
- + //---- anti-cheat features -->>>
- + bool check_passed = true;
- + #ifdef MOVEMENT_ANTICHEAT_DEBUG
- + if (plMover){
- + sLog.outBasic("MA-%s > client-time:%d fall-time:%d | xyzo: %f,%f,%fo(%f) flags[%X] opcode[%s]| transport (xyzo): %f,%f,%fo(%f)",
- + plMover->GetName(),movementInfo.time,movementInfo.fallTime,movementInfo.x,movementInfo.y,movementInfo.z,movementInfo.o,
- + movementInfo.flags, LookupOpcodeName(opcode),movementInfo.t_x,movementInfo.t_y,movementInfo.t_z,movementInfo.t_o);
- + sLog.outBasic("MA-%s Transport > server GUID: %d | client GUID: (lo)%d - (hi)%d",
- + plMover->GetName(),plMover->m_anti_TransportGUID, GUID_LOPART(movementInfo.t_guid), GUID_HIPART(movementInfo.t_guid));
- + } else {
- + sLog.outBasic("MA > client-time:%d fall-time:%d | xyzo: %f,%f,%fo(%f) flags[%X] opcode[%s]| transport (xyzo): %f,%f,%fo(%f)",
- + movementInfo.time,movementInfo.fallTime,movementInfo.x,movementInfo.y,movementInfo.z,movementInfo.o,
- + movementInfo.flags, LookupOpcodeName(opcode),movementInfo.t_x,movementInfo.t_y,movementInfo.t_z,movementInfo.t_o);
- + sLog.outBasic("MA Transport > server GUID: | client GUID: (lo)%d - (hi)%d",
- + GUID_LOPART(movementInfo.t_guid), GUID_HIPART(movementInfo.t_guid));
- + }
- + #endif
- +
- + if (plMover && World::GetEnableMvAnticheat())
- + {
- + //calc time deltas
- + int32 cClientTimeDelta = 1500;
- + if (plMover->m_anti_LastClientTime !=0){
- + cClientTimeDelta = movementInfo.time - plMover->m_anti_LastClientTime;
- + plMover->m_anti_DeltaClientTime += cClientTimeDelta;
- + plMover->m_anti_LastClientTime = movementInfo.time;
- + } else {
- + plMover->m_anti_LastClientTime = movementInfo.time;
- + }
- +
- + uint32 cServerTime=getMSTime();
- + uint32 cServerTimeDelta = 1500;
- + if (plMover->m_anti_LastServerTime != 0){
- + cServerTimeDelta = cServerTime - plMover->m_anti_LastServerTime;
- + plMover->m_anti_DeltaServerTime += cServerTimeDelta;
- + plMover->m_anti_LastServerTime = cServerTime;
- + } else {
- + plMover->m_anti_LastServerTime = cServerTime;
- + }
- +
- + //resync times on client login (first 15 sec for heavy areas)
- + if (plMover->m_anti_DeltaServerTime < 15000 && plMover->m_anti_DeltaClientTime < 15000)
- + plMover->m_anti_DeltaClientTime = plMover->m_anti_DeltaServerTime;
- +
- + int32 sync_time = plMover->m_anti_DeltaClientTime - plMover->m_anti_DeltaServerTime;
- +
- + #ifdef MOVEMENT_ANTICHEAT_DEBUG
- + sLog.outBasic("MA-%s Time > cClientTimeDelta: %d, cServerTime: %d || deltaC: %d - deltaS: %d || SyncTime: %d",
- + plMover->GetName(),cClientTimeDelta, cServerTime,
- + plMover->m_anti_DeltaClientTime, plMover->m_anti_DeltaServerTime, sync_time);
- + #endif
- +
- + //mistiming checks
- + int32 gmd = World::GetMistimingDelta();
- + if (sync_time > gmd || sync_time < -gmd){
- + cClientTimeDelta = cServerTimeDelta;
- + plMover->m_anti_MistimingCount++;
- +
- + sLog.outError("MA-%s, mistiming exception. #:%d, mistiming: %dms ",
- + plMover->GetName(), plMover->m_anti_MistimingCount, sync_time);
- +
- + if (plMover->m_anti_MistimingCount > World::GetMistimingAlarms())
- + {
- + plMover->GetSession()->KickPlayer();
- + return;
- + }
- + check_passed = false;
- + }
- + // end mistiming checks
- +
- +
- + uint32 curDest = plMover->m_taxi.GetTaxiDestination(); //check taxi flight
- + if ((plMover->m_anti_TransportGUID == 0) && !curDest)
- + {
- + UnitMoveType move_type;
- +
- + // calculating section ---------------------
- + //current speed
- + if (movementInfo.flags & MOVEMENTFLAG_FLYING) move_type = movementInfo.flags & MOVEMENTFLAG_BACKWARD ? MOVE_FLIGHT_BACK : MOVE_FLIGHT;
- + else if (movementInfo.flags & MOVEMENTFLAG_SWIMMING) move_type = movementInfo.flags & MOVEMENTFLAG_BACKWARD ? MOVE_SWIM_BACK : MOVE_SWIM;
- + else if (movementInfo.flags & MOVEMENTFLAG_WALK_MODE) move_type = MOVE_WALK;
- + //hmm... in first time after login player has MOVE_SWIMBACK instead MOVE_WALKBACK
- + else move_type = movementInfo.flags & MOVEMENTFLAG_BACKWARD ? MOVE_SWIM_BACK : MOVE_RUN;
- +
- + float current_speed = plMover->GetSpeed(move_type);
- + // end current speed
- +
- + // movement distance
- + float allowed_delta= 0;
- +
- + float delta_x = plMover->GetPositionX() - movementInfo.x;
- + float delta_y = plMover->GetPositionY() - movementInfo.y;
- + float delta_z = plMover->GetPositionZ() - movementInfo.z;
- + float real_delta = delta_x * delta_x + delta_y * delta_y;
- + float tg_z = -99999; //tangens
- + // end movement distance
- +
- + if (cClientTimeDelta < 0) {cClientTimeDelta = 0;}
- + float time_delta = (cClientTimeDelta < 1500) ? (float)cClientTimeDelta/1000 : 1.5f; //normalize time - 1.5 second allowed for heavy loaded server
- +
- + if (!(movementInfo.flags & (MOVEMENTFLAG_FLYING | MOVEMENTFLAG_SWIMMING)))
- + tg_z = (real_delta !=0) ? (delta_z*delta_z / real_delta) : -99999;
- +
- + if (current_speed < plMover->m_anti_Last_HSpeed)
- + {
- + allowed_delta = plMover->m_anti_Last_HSpeed;
- + if (plMover->m_anti_LastSpeedChangeTime == 0 )
- + plMover->m_anti_LastSpeedChangeTime = movementInfo.time + (uint32)floor(((plMover->m_anti_Last_HSpeed / current_speed) * 1500)) + 100; //100ms above for random fluctuating =)))
- + } else {
- + allowed_delta = current_speed;
- + }
- + allowed_delta = allowed_delta * time_delta;
- + allowed_delta = allowed_delta * allowed_delta + 2;
- + if (tg_z > 2.2)
- + allowed_delta = allowed_delta + (delta_z*delta_z)/2.37; // mountain fall allowed speed
- +
- + if (movementInfo.time>plMover->m_anti_LastSpeedChangeTime)
- + {
- + plMover->m_anti_Last_HSpeed = current_speed; // store current speed
- + plMover->m_anti_Last_VSpeed = -2.3f;
- + if (plMover->m_anti_LastSpeedChangeTime != 0) plMover->m_anti_LastSpeedChangeTime = 0;
- + }
- + // end calculating section ---------------------
- +
- + //AntiGravitation (thanks to Meekro)
- + float JumpHeight = plMover->m_anti_JumpBaseZ - movementInfo.z;
- + if ((plMover->m_anti_JumpBaseZ != 0)
- + && !(movementInfo.flags & (MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_FLYING | MOVEMENTFLAG_FLYING2))
- + && (JumpHeight < plMover->m_anti_Last_VSpeed))
- + {
- + #ifdef MOVEMENT_ANTICHEAT_DEBUG
- + sLog.outError("MA-%s, GraviJump exception. JumpHeight = %f, Allowed Veritcal Speed = %f",
- + plMover->GetName(), JumpHeight, plMover->m_anti_Last_VSpeed);
- + #endif
- + check_passed = false;
- + }
- + //multi jump checks
- + if (opcode == MSG_MOVE_JUMP && !plMover->IsInWater())
- + {
- + if (plMover->m_anti_JustJumped >= 1){
- + check_passed = false; //don't process new jump packet
- + } else {
- + plMover->m_anti_JustJumped += 1;
- + plMover->m_anti_JumpBaseZ = movementInfo.z;
- + }
- + } else if (plMover->IsInWater()) {
- + plMover->m_anti_JustJumped = 0;
- + }
- +
- + //speed hack checks
- + if ((real_delta > allowed_delta)) // && (delta_z < 0))
- + {
- + #ifdef MOVEMENT_ANTICHEAT_DEBUG
- + sLog.outError("MA-%s, speed exception | cDelta=%f aDelta=%f | cSpeed=%f lSpeed=%f deltaTime=%f",
- + plMover->GetName(), real_delta, allowed_delta, current_speed, plMover->m_anti_Last_HSpeed,time_delta);
- + #endif
- + check_passed = false;
- + }
- + //teleport hack checks
- + if ((real_delta>4900.0f) && !(real_delta < allowed_delta))
- + {
- + #ifdef MOVEMENT_ANTICHEAT_DEBUG
- + sLog.outError("MA-%s, is teleport exception | cDelta=%f aDelta=%f | cSpeed=%f lSpeed=%f deltaToime=%f",
- + plMover->GetName(),real_delta, allowed_delta, current_speed, plMover->m_anti_Last_HSpeed,time_delta);
- + #endif
- + check_passed = false;
- + }
- +
- + //mountian hack checks // 1.56f (delta_z < GetPlayer()->m_anti_Last_VSpeed))
- + if ((delta_z < plMover->m_anti_Last_VSpeed) && (plMover->m_anti_JustJumped == 0) && (tg_z > 2.37f))
- + {
- + #ifdef MOVEMENT_ANTICHEAT_DEBUG
- + sLog.outError("MA-%s, mountain exception | tg_z=%f", plMover->GetName(),tg_z);
- + #endif
- + check_passed = false;
- + }
- + //Fly hack checks
- + if (((movementInfo.flags & (MOVEMENTFLAG_CAN_FLY | MOVEMENTFLAG_FLYING | MOVEMENTFLAG_FLYING2)) != 0)
- + && !plMover->isGameMaster()
- + && !(plMover->HasAuraType(SPELL_AURA_FLY) || plMover->HasAuraType(SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED)))
- + {
- + #ifdef MOVEMENT_ANTICHEAT_DEBUG
- + sLog.outError("MA-%s, flight exception. {SPELL_AURA_FLY=[%X]} {SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED=[%X]} {SPELL_AURA_MOD_SPEED_FLIGHT=[%X]} {SPELL_AURA_MOD_FLIGHT_SPEED_ALWAYS=[%X]} {SPELL_AURA_MOD_FLIGHT_SPEED_NOT_STACK=[%X]}",
- + plMover->GetName(),
- + plMover->HasAuraType(SPELL_AURA_FLY), plMover->HasAuraType(SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED),
- + plMover->HasAuraType(SPELL_AURA_MOD_SPEED_FLIGHT), plMover->HasAuraType(SPELL_AURA_MOD_FLIGHT_SPEED_ALWAYS),
- + plMover->HasAuraType(SPELL_AURA_MOD_FLIGHT_SPEED_NOT_STACK));
- + #endif
- + check_passed = false;
- + }
- + //Water-Walk checks
- + if (((movementInfo.flags & MOVEMENTFLAG_WATERWALKING) != 0)
- + && !plMover->isGameMaster()
- + && !(plMover->HasAuraType(SPELL_AURA_WATER_WALK) | plMover->HasAuraType(SPELL_AURA_GHOST)))
- + {
- + #ifdef MOVEMENT_ANTICHEAT_DEBUG
- + sLog.outError("MA-%s, water-walk exception. [%X]{SPELL_AURA_WATER_WALK=[%X]}",
- + plMover->GetName(), movementInfo.flags, plMover->HasAuraType(SPELL_AURA_WATER_WALK));
- + #endif
- + check_passed = false;
- + }
- + //Teleport To Plane checks
- + if (movementInfo.z < 0.0001f && movementInfo.z > -0.0001f
- + && ((movementInfo.flags & (MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_CAN_FLY | MOVEMENTFLAG_FLYING | MOVEMENTFLAG_FLYING2)) == 0)
- + && !plMover->isGameMaster())
- + {
- + // Prevent using TeleportToPlan.
- + Map *map = plMover->GetMap();
- + if (map){
- + float plane_z = map->GetHeight(movementInfo.x, movementInfo.y, MAX_HEIGHT) - movementInfo.z;
- + plane_z = (plane_z < -500.0f) ? 0 : plane_z; //check holes in heigth map
- + if(plane_z > 0.1f || plane_z < -0.1f)
- + {
- + plMover->m_anti_TeleToPlane_Count++;
- + check_passed = false;
- + #ifdef MOVEMENT_ANTICHEAT_DEBUG
- + sLog.outDebug("MA-%s, teleport to plan exception. plane_z: %f ",
- + plMover->GetName(), plane_z);
- + #endif
- + if (plMover->m_anti_TeleToPlane_Count > World::GetTeleportToPlaneAlarms())
- + {
- + sLog.outError("MA-%s, teleport to plan exception. Exception count: %d ",
- + plMover->GetName(), plMover->m_anti_TeleToPlane_Count);
- + plMover->GetSession()->KickPlayer();
- + return;
- + }
- + }
- + }
- + } else {
- + if (plMover->m_anti_TeleToPlane_Count != 0)
- + plMover->m_anti_TeleToPlane_Count = 0;
- + }
- + } else if (movementInfo.flags & MOVEMENTFLAG_ONTRANSPORT) {
- + //antiwrap checks
- + if (plMover->m_transport)
- + {
- + float trans_rad = movementInfo.t_x*movementInfo.t_x + movementInfo.t_y*movementInfo.t_y + movementInfo.t_z*movementInfo.t_z;
- + if (trans_rad > 3600.0f){
- + check_passed = false;
- + #ifdef MOVEMENT_ANTICHEAT_DEBUG
- + sLog.outError("MA-%s, leave transport.", plMover->GetName());
- + #endif
- + }
- + } else {
- + if (GameObjectData const* go_data = objmgr.GetGOData(plMover->m_anti_TransportGUID))
- + {
- + float delta_gox = go_data->posX - movementInfo.x;
- + float delta_goy = go_data->posY - movementInfo.y;
- + float delta_goz = go_data->posZ - movementInfo.z;
- + int mapid = go_data->mapid;
- + #ifdef MOVEMENT_ANTICHEAT_DEBUG
- + sLog.outDebug("MA-%s, transport movement. GO xyzo: %f,%f,%f",
- + plMover->GetName(), go_data->posX,go_data->posY,go_data->posZ);
- + #endif
- + if (plMover->GetMapId() != mapid){
- + check_passed = false;
- + } else if (mapid !=369) {
- + float delta_go = delta_gox*delta_gox + delta_goy*delta_goy;
- + if (delta_go > 3600.0f) {
- + check_passed = false;
- + #ifdef MOVEMENT_ANTICHEAT_DEBUG
- + sLog.outError("MA-%s, leave transport. GO xyzo: %f,%f,%f",
- + plMover->GetName(), go_data->posX,go_data->posY,go_data->posZ);
- + #endif
- + }
- + }
- +
- + } else {
- + #ifdef MOVEMENT_ANTICHEAT_DEBUG
- + sLog.outDebug("MA-%s, undefined transport.", plMover->GetName());
- + #endif
- + check_passed = false;
- + }
- + }
- + if (!check_passed){
- + if (plMover->m_transport)
- + {
- + plMover->m_transport->RemovePassenger(plMover);
- + plMover->m_transport = NULL;
- + }
- + movementInfo.t_x = 0.0f;
- + movementInfo.t_y = 0.0f;
- + movementInfo.t_z = 0.0f;
- + movementInfo.t_o = 0.0f;
- + movementInfo.t_time = 0;
- + plMover->m_anti_TransportGUID = 0;
- + }
- + }
- + }
- /* process position-change */
- + if (check_passed)
- + {
- recv_data.put<uint32>(6, getMSTime()); // fix time, offset flags(4) + unk(2)
- WorldPacket data(recv_data.GetOpcode(), (mover->GetPackGUID().size()+recv_data.size()));
- data.append(mover->GetPackGUID()); // use mover guid
- @@ -331,12 +653,28 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
- plMover->RepopAtGraveyard();
- }
- }
- + //movement anticheat >>>
- + if (plMover->m_anti_AlarmCount > 0){
- + sLog.outError("MA-%s produce %d anticheat alarms",plMover->GetName(),plMover->m_anti_AlarmCount);
- + plMover->m_anti_AlarmCount = 0;
- + }
- + // end movement anticheat
- }
- else // creature charmed
- {
- if(mover->IsInWorld())
- mover->GetMap()->CreatureRelocation((Creature*)mover, movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o);
- }
- +
- + } else if (plMover) {
- + plMover->m_anti_AlarmCount++;
- + WorldPacket data;
- + plMover->m_movementInfo.SetMovementFlags(MovementFlags(MOVEMENTFLAG_NONE));
- + plMover->BuildTeleportAckMsg(&data, plMover->GetPositionX(), plMover->GetPositionY(), plMover->GetPositionZ(), plMover->GetOrientation());
- + plMover->GetSession()->SendPacket(&data);
- + plMover->BuildHeartBeatMsg(&data);
- + plMover->SendMessageToSet(&data, true);
- + }
- }
- void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recv_data)
- @@ -489,34 +827,33 @@ void WorldSession::HandleMountSpecialAnimOpcode(WorldPacket& /*recvdata*/)
- GetPlayer()->SendMessageToSet(&data, false);
- }
- -void WorldSession::HandleMoveKnockBackAck( WorldPacket & /*recv_data*/ )
- +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;
- - uint32 sequence;
- - uint32 ukn1;
- - float xdirection,ydirection,hspeed,vspeed;
- + /* extract packet */
- + MovementInfo movementInfo;
- + uint32 unk1,unk2,unk3;
- + recv_data >> unk1 >> unk2 >> unk3;
- + ReadMovementInfo(recv_data, &movementInfo);
- - recv_data >> guid;
- - recv_data >> sequence;
- - recv_data >> flags >> time;
- - recv_data >> x >> y >> z >> orientation;
- - recv_data >> ukn1; //unknown
- - recv_data >> vspeed >> xdirection >> ydirection >> hspeed;
- + //Save movement flags
- + _player->m_movementInfo.SetMovementFlags(MovementFlags(movementInfo.flags));
- - // skip not personal message;
- - if(GetPlayer()->GetGUID()!=guid)
- - return;
- + #ifdef MOVEMENT_ANTICHEAT_DEBUG
- + sLog.outBasic("%s CMSG_MOVE_KNOCK_BACK_ACK: tm:%d ftm:%d | %f,%f,%fo(%f) [%X]",GetPlayer()->GetName(),movementInfo.time,movementInfo.fallTime,movementInfo.x,movementInfo.y,movementInfo.z,movementInfo.o,movementInfo.flags);
- + sLog.outBasic("%s CMSG_MOVE_KNOCK_BACK_ACK additional: vspeed:%f, hspeed:%f",GetPlayer()->GetName(), movementInfo.j_unk, movementInfo.j_xyspeed);
- + #endif
- +
- + _player->m_movementInfo = movementInfo;
- + _player->m_anti_Last_HSpeed = movementInfo.j_xyspeed;
- + _player->m_anti_Last_VSpeed = movementInfo.j_unk < 3.2f ? movementInfo.j_unk - 1.0f : 3.2f;
- - // check code
- - */
- + uint32 dt = (_player->m_anti_Last_VSpeed < 0) ? (int)(ceil(_player->m_anti_Last_VSpeed/-25)*1000) : (int)(ceil(_player->m_anti_Last_VSpeed/25)*1000);
- + _player->m_anti_LastSpeedChangeTime = movementInfo.time + dt + 1000;
- }
- void WorldSession::HandleMoveHoverAck( WorldPacket& /*recv_data*/ )
- diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
- index 60d8fef..e40378c 100644
- --- a/src/game/ObjectMgr.cpp
- +++ b/src/game/ObjectMgr.cpp
- @@ -4841,8 +4841,8 @@ void ObjectMgr::LoadAreaTriggerScripts()
- sLog.outString();
- sLog.outString( ">> Loaded %u areatrigger scripts", count );
- }
- -
- -uint32 ObjectMgr::GetNearestTaxiNode( float x, float y, float z, uint32 mapid, uint32 team )
- +//use searched_node for search some known node
- +uint32 ObjectMgr::GetNearestTaxiNode( float x, float y, float z, uint32 mapid, uint32 team, uint32 searched_node )
- {
- bool found = false;
- float dist;
- @@ -4851,9 +4851,23 @@ uint32 ObjectMgr::GetNearestTaxiNode( float x, float y, float z, uint32 mapid, u
- for(uint32 i = 1; i < sTaxiNodesStore.GetNumRows(); ++i)
- {
- TaxiNodesEntry const* node = sTaxiNodesStore.LookupEntry(i);
- - if(!node || node->map_id != mapid || !node->MountCreatureID[team == ALLIANCE ? 1 : 0])
- +
- + if (!node || node->map_id != mapid)
- + continue;
- +
- + float dist2 = (node->x - x)*(node->x - x)+(node->y - y)*(node->y - y)+(node->z - z)*(node->z - z);
- +
- + if (searched_node != 0 && i == searched_node){
- + id = i;
- + dist = dist2;
- + break;
- + }
- +
- + if(!node->MountCreatureID[team == ALLIANCE ? 1 : 0])
- continue;
- + // float dist2 = (node->x - x)*(node->x - x)+(node->y - y)*(node->y - y)+(node->z - z)*(node->z - z);
- +
- uint8 field = (uint8)((i - 1) / 32);
- uint32 submask = 1<<((i-1)%32);
- @@ -4861,7 +4875,6 @@ uint32 ObjectMgr::GetNearestTaxiNode( float x, float y, float z, uint32 mapid, u
- if((sTaxiNodesMask[field] & submask)==0)
- continue;
- - float dist2 = (node->x - x)*(node->x - x)+(node->y - y)*(node->y - y)+(node->z - z)*(node->z - z);
- if(found)
- {
- if(dist2 < dist)
- @@ -4878,6 +4891,11 @@ uint32 ObjectMgr::GetNearestTaxiNode( float x, float y, float z, uint32 mapid, u
- }
- }
- + //movement anticheat fix
- + if (dist > 3600)
- + id = 0;
- + //movement anticheat fix
- +
- return id;
- }
- diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h
- index b36394c..a4705cf 100644
- --- a/src/game/ObjectMgr.h
- +++ b/src/game/ObjectMgr.h
- @@ -401,7 +401,7 @@ class ObjectMgr
- uint32 GetPlayerAccountIdByGUID(const uint64 &guid) const;
- uint32 GetPlayerAccountIdByPlayerName(const std::string& name) const;
- - uint32 GetNearestTaxiNode( float x, float y, float z, uint32 mapid, uint32 team );
- + uint32 GetNearestTaxiNode( float x, float y, float z, uint32 mapid, uint32 team, uint32 searched_node );
- void GetTaxiPath( uint32 source, uint32 destination, uint32 &path, uint32 &cost);
- uint32 GetTaxiMountDisplayId( uint32 id, uint32 team, bool allowed_alt_team = false);
- void GetTaxiPathNodes( uint32 path, Path &pathnodes, std::vector<uint32>& mapIds );
- diff --git a/src/game/Player.cpp b/src/game/Player.cpp
- index 650040e..7f158c8 100644
- --- a/src/game/Player.cpp
- +++ b/src/game/Player.cpp
- @@ -404,7 +404,30 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this), m_reputa
- m_rest_bonus=0;
- rest_type=REST_TYPE_NO;
- ////////////////////Rest System/////////////////////
- + //movement anticheat
- + m_anti_LastClientTime = 0; //last movement client time
- + m_anti_LastServerTime = 0; //last movement server time
- + m_anti_DeltaClientTime = 0; //client side session time
- + m_anti_DeltaServerTime = 0; //server side session time
- + m_anti_MistimingCount = 0; //mistiming counts before kick
- + m_anti_LastSpeedChangeTime = 0; //last speed change time
- + m_anti_BeginFallTime = 0; //alternative falling begin time (obsolete)
- +
- + m_anti_Last_HSpeed = 7.0f; //horizontal speed, default RUN speed
- + m_anti_Last_VSpeed = -2.3f; //vertical speed, default max jump height
- +
- + m_anti_TransportGUID = 0; //current transport GUID
- +
- + m_anti_JustTeleported = 0; //seted when player was teleported
- + m_anti_TeleToPlane_Count = 0; //Teleport To Plane alarm counter
- +
- + m_anti_AlarmCount = 0; //alarm counter
- +
- + m_anti_JustJumped = 0; //Jump already began, anti air jump check
- + m_anti_JumpBaseZ = 0; //Z coord before jump (AntiGrav)
- + // << movement anticheat
- + /////////////////////////////////
- m_mailsLoaded = false;
- m_mailsUpdated = false;
- unReadMails = 0;
- @@ -1560,7 +1583,9 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
- sLog.outError("TeleportTo: invalid map %d or absent instance template.", mapid);
- return false;
- }
- -
- + //movement anticheat
- + m_anti_JustTeleported = 1;
- + //end movement anticheat
- // preparing unsummon pet if lost (we must get pet before teleportation or will not find it later)
- Pet* pet = GetPet();
- @@ -1615,6 +1640,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
- if ((GetMapId() == mapid) && (!m_transport))
- {
- + m_anti_JumpBaseZ = 0;
- //lets reset far teleport flag if it wasn't reset during chained teleports
- SetSemaphoreTeleportFar(false);
- //setup delayed teleport flag
- @@ -1761,6 +1787,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
- m_teleport_dest = WorldLocation(mapid, final_x, final_y, final_z, final_o);
- SetFallInformation(0, final_z);
- + m_anti_JumpBaseZ = 0;
- // if the player is saved before worldportack (at logout for example)
- // this will be used instead of the current location in SaveToDB
- @@ -19482,6 +19509,8 @@ void Player::EnterVehicle(Vehicle *vehicle)
- data << uint32(0); // fall time
- GetSession()->SendPacket(&data);
- + SetPosition(vehicle->GetPositionX(), vehicle->GetPositionY(), vehicle->GetPositionZ(),vehicle->GetOrientation());
- +
- data.Initialize(SMSG_PET_SPELLS, 8+2+4+4+4*MAX_UNIT_ACTION_BAR_INDEX+1+1);
- data << uint64(vehicle->GetGUID());
- data << uint16(0);
- diff --git a/src/game/Player.h b/src/game/Player.h
- index f951af9..e063a7a 100644
- --- a/src/game/Player.h
- +++ b/src/game/Player.h
- @@ -2384,6 +2384,29 @@ class MANGOS_DLL_SPEC Player : public Unit
- float m_rest_bonus;
- RestType rest_type;
- ////////////////////Rest System/////////////////////
- + //movement anticheat
- + uint32 m_anti_LastClientTime; //last movement client time
- + uint32 m_anti_LastServerTime; //last movement server time
- + uint32 m_anti_DeltaClientTime; //client side session time
- + uint32 m_anti_DeltaServerTime; //server side session time
- + uint32 m_anti_MistimingCount; //mistiming counts before kick
- +
- + uint32 m_anti_LastSpeedChangeTime;//last speed change time
- + uint32 m_anti_BeginFallTime; //alternative falling begin time (obsolete)
- +
- + float m_anti_Last_HSpeed; //horizontal speed, default RUN speed
- + float m_anti_Last_VSpeed; //vertical speed, default max jump height
- +
- + uint64 m_anti_TransportGUID; //current transport GUID
- +
- + uint32 m_anti_JustTeleported; //seted when player was teleported
- + uint32 m_anti_TeleToPlane_Count; //Teleport To Plane alarm counter
- +
- + uint64 m_anti_AlarmCount; //alarm counter
- +
- + uint32 m_anti_JustJumped; //Jump already began, anti air jump check
- + float m_anti_JumpBaseZ; //Z coord before jump
- + // << movement anticheat
- // Transports
- Transport * m_transport;
- diff --git a/src/game/TaxiHandler.cpp b/src/game/TaxiHandler.cpp
- index fe2f28c..eef187b 100644
- --- a/src/game/TaxiHandler.cpp
- +++ b/src/game/TaxiHandler.cpp
- @@ -53,7 +53,7 @@ void WorldSession::SendTaxiStatus( uint64 guid )
- return;
- }
- - uint32 curloc = objmgr.GetNearestTaxiNode(unit->GetPositionX(),unit->GetPositionY(),unit->GetPositionZ(),unit->GetMapId(),GetPlayer( )->GetTeam());
- + uint32 curloc = objmgr.GetNearestTaxiNode(unit->GetPositionX(),unit->GetPositionY(),unit->GetPositionZ(),unit->GetMapId(),GetPlayer( )->GetTeam(),0);
- // not found nearest
- if(curloc == 0)
- @@ -100,7 +100,7 @@ void WorldSession::HandleTaxiQueryAvailableNodes( WorldPacket & recv_data )
- void WorldSession::SendTaxiMenu( Creature* unit )
- {
- // find current node
- - uint32 curloc = objmgr.GetNearestTaxiNode(unit->GetPositionX(),unit->GetPositionY(),unit->GetPositionZ(),unit->GetMapId(),GetPlayer( )->GetTeam());
- + uint32 curloc = objmgr.GetNearestTaxiNode(unit->GetPositionX(),unit->GetPositionY(),unit->GetPositionZ(),unit->GetMapId(),GetPlayer( )->GetTeam(), 0);
- if ( curloc == 0 )
- return;
- @@ -135,7 +135,7 @@ void WorldSession::SendDoFlight( uint32 mountDisplayId, uint32 path, uint32 path
- bool WorldSession::SendLearnNewTaxiNode( Creature* unit )
- {
- // find current node
- - uint32 curloc = objmgr.GetNearestTaxiNode(unit->GetPositionX(),unit->GetPositionY(),unit->GetPositionZ(),unit->GetMapId(),GetPlayer( )->GetTeam());
- + uint32 curloc = objmgr.GetNearestTaxiNode(unit->GetPositionX(),unit->GetPositionY(),unit->GetPositionZ(),unit->GetMapId(),GetPlayer( )->GetTeam(), 0);
- if ( curloc == 0 )
- return true; // `true` send to avoid WorldSession::SendTaxiMenu call with one more curlock seartch with same false result.
- @@ -193,7 +193,8 @@ void WorldSession::HandleActivateTaxiExpressOpcode ( WorldPacket & recv_data )
- GetPlayer()->ActivateTaxiPathTo(nodes, npc);
- }
- -void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& /*recv_data*/)
- +
- +void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data)
- {
- sLog.outDebug( "WORLD: Received CMSG_MOVE_SPLINE_DONE" );
- @@ -201,12 +202,93 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& /*recv_data*/)
- // 1) end taxi path in far (multi-node) flight
- // 2) switch from one map to other in case multim-map taxi path
- // we need proccess only (1)
- +
- + //movement anticheat code
- + /* extract packet */
- + Unit *mover = _player->m_mover;
- + Player *plMover = mover->GetTypeId()==TYPEID_PLAYER ? (Player*)mover : NULL;
- + if (!plMover)
- + return;
- +
- + MovementInfo movementInfo;
- + ReadMovementInfo(recv_data, &movementInfo);
- + //<<< end movement anticheat
- +
- uint32 curDest = GetPlayer()->m_taxi.GetTaxiDestination();
- +
- if(!curDest)
- + {
- + //movement anticheat code
- + GetPlayer()->SetPosition(movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o);
- + GetPlayer()->m_movementInfo = movementInfo;
- + GetPlayer()->m_movementInfo.SetMovementFlags(MovementFlags(movementInfo.flags));
- +
- + //calc time deltas
- + int32 cClientTimeDelta = 0;
- + if (GetPlayer()->m_anti_LastClientTime !=0){
- + cClientTimeDelta = movementInfo.time - GetPlayer()->m_anti_LastClientTime;
- + GetPlayer()->m_anti_DeltaClientTime += cClientTimeDelta;
- + GetPlayer()->m_anti_LastClientTime = movementInfo.time;
- + } else {
- + GetPlayer()->m_anti_LastClientTime = movementInfo.time;
- + }
- +
- + uint32 cServerTime=getMSTime();
- + uint32 cServerTimeDelta = 0;
- + if (GetPlayer()->m_anti_LastServerTime != 0){
- + cServerTimeDelta = cServerTime - GetPlayer()->m_anti_LastServerTime;
- + GetPlayer()->m_anti_DeltaServerTime += cServerTimeDelta;
- + GetPlayer()->m_anti_LastServerTime = cServerTime;
- + } else {
- + GetPlayer()->m_anti_LastServerTime = cServerTime;
- + }
- +
- + GetPlayer()->m_anti_JustTeleported = 1;
- + //end movement anticheat
- return;
- + }
- +
- + //movment anticheat
- + uint32 curloc = objmgr.GetNearestTaxiNode(movementInfo.x,movementInfo.y,movementInfo.z,GetPlayer()->GetMapId(),GetPlayer( )->GetTeam(), curDest);
- + //end movement anticheat
- +
- + //sLog.outBasic("MA-%s > | xyzo: %f,%f,%fo(%f) flags[%X] | curloc: %d | destloc: %d ",
- + // GetPlayer()->GetName(),movementInfo.x,movementInfo.y,movementInfo.z,movementInfo.o,
- + // movementInfo.flags, curloc,curDest);
- TaxiNodesEntry const* curDestNode = sTaxiNodesStore.LookupEntry(curDest);
- + if(curDestNode && curDestNode->map_id == GetPlayer()->GetMapId())
- + {
- + while(GetPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType()==FLIGHT_MOTION_TYPE)
- + GetPlayer()->GetMotionMaster()->MovementExpired(false);
- + }
- +
- + //movement anticheat code
- + GetPlayer()->SetPosition(movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o);
- + GetPlayer()->m_movementInfo = movementInfo;
- + GetPlayer()->m_movementInfo.SetMovementFlags(MovementFlags(movementInfo.flags));
- + //calc time deltas
- + int32 cClientTimeDelta = 0;
- + if (GetPlayer()->m_anti_LastClientTime !=0){
- + cClientTimeDelta = movementInfo.time - GetPlayer()->m_anti_LastClientTime;
- + GetPlayer()->m_anti_DeltaClientTime += cClientTimeDelta;
- + GetPlayer()->m_anti_LastClientTime = movementInfo.time;
- + } else {
- + GetPlayer()->m_anti_LastClientTime = movementInfo.time;
- + }
- +
- + uint32 cServerTime=getMSTime();
- + uint32 cServerTimeDelta = 0;
- + if (GetPlayer()->m_anti_LastServerTime != 0){
- + cServerTimeDelta = cServerTime - GetPlayer()->m_anti_LastServerTime;
- + GetPlayer()->m_anti_DeltaServerTime += cServerTimeDelta;
- + GetPlayer()->m_anti_LastServerTime = cServerTime;
- + } else {
- + GetPlayer()->m_anti_LastServerTime = cServerTime;
- + }
- + //<<< end movement anticheat
- +
- // far teleport case
- if(curDestNode && curDestNode->map_id != GetPlayer()->GetMapId())
- {
- @@ -223,6 +305,24 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& /*recv_data*/)
- }
- return;
- }
- +
- + //<<< movement anticheat fix - disallow unmount from taxi
- + if(curloc != curDest){
- + // current source node for next destination
- + uint32 sourcenode = GetPlayer()->m_taxi.GetTaxiSource();
- + uint16 MountId = objmgr.GetTaxiMountDisplayId(sourcenode, GetPlayer()->GetTeam());
- +
- + uint32 path, cost;
- + objmgr.GetTaxiPath( sourcenode, curDest, path, cost);
- +
- + if(path && MountId)
- + SendDoFlight( MountId, path, 1 ); // skip start fly node
- + else
- + GetPlayer()->m_taxi.ClearTaxiDestinations(); // clear problematic path and next
- + return;
- + }
- + ///<<< movement anticheat
- +
- uint32 destinationnode = GetPlayer()->m_taxi.NextTaxiDestination();
- if ( destinationnode > 0 ) // if more destinations to go
- diff --git a/src/game/World.cpp b/src/game/World.cpp
- index d8a5ab6..e7b39c8 100644
- --- a/src/game/World.cpp
- +++ b/src/game/World.cpp
- @@ -76,6 +76,12 @@ float World::m_MaxVisibleDistanceInFlight = DEFAULT_VISIBILITY_DISTANCE;
- float World::m_VisibleUnitGreyDistance = 0;
- float World::m_VisibleObjectGreyDistance = 0;
- +//movement anticheat
- +bool World::m_EnableMvAnticheat = true;
- +uint32 World::m_TeleportToPlaneAlarms = 50;
- +uint32 World::m_MistimingAlarms = 20;
- +uint32 World::m_MistimingDelta = 2000;
- +
- /// World constructor
- World::World()
- {
- @@ -530,7 +536,35 @@ void World::LoadConfigSettings(bool reload)
- sLog.outError("DurabilityLossChance.Block (%f) must be >=0. Using 0.0 instead.",rate_values[RATE_DURABILITY_LOSS_BLOCK]);
- rate_values[RATE_DURABILITY_LOSS_BLOCK] = 0.0f;
- }
- -
- + // movement anticheat
- + m_EnableMvAnticheat = sConfig.GetBoolDefault("Anticheat.Movement.Enable",true);
- + m_TeleportToPlaneAlarms = sConfig.GetIntDefault("Anticheat.Movement.TeleportToPlaneAlarms", 50);
- + if (m_TeleportToPlaneAlarms<20){
- + sLog.outError("Anticheat.Movement.TeleportToPlaneAlarms (%d) must be >=20. Using 20 instead.",m_TeleportToPlaneAlarms);
- + m_TeleportToPlaneAlarms = 20;
- + }
- + if (m_TeleportToPlaneAlarms>100){
- + sLog.outError("Anticheat.Movement.TeleportToPlaneAlarms (%d) must be <=100. Using 100 instead.",m_TeleportToPlaneAlarms);
- + m_TeleportToPlaneAlarms = 100;
- + }
- + m_MistimingDelta = sConfig.GetIntDefault("Anticheat.Movement.MistimingDelta",10000);
- + if (m_MistimingDelta<1000){
- + sLog.outError("Anticheat.Movement.m_MistimingDelta (%d) must be >=1000ms. Using 1000 instead.",m_TeleportToPlaneAlarms);
- + m_MistimingDelta = 1000;
- + }
- + if (m_MistimingDelta>15000){
- + sLog.outError("Anticheat.Movement.m_MistimingDelta (%d) must be <=15000ms. Using 15000 instead.",m_TeleportToPlaneAlarms);
- + m_MistimingDelta = 15000;
- + }
- + m_MistimingAlarms = sConfig.GetIntDefault("Anticheat.Movement.MistimingAlarms",20);
- + if (m_MistimingAlarms<10) {
- + sLog.outError("Anticheat.Movement.MistimingAlarms (%d) must be >=20. Using 10 instead.",m_TeleportToPlaneAlarms);
- + m_MistimingAlarms = 10;
- + }
- + if (m_MistimingAlarms>50){
- + sLog.outError("Anticheat.Movement.m_MistimingAlarms (%d) must be <=50. Using 50 instead.",m_TeleportToPlaneAlarms);
- + m_MistimingAlarms = 50;
- + }
- ///- Read other configuration items from the config file
- m_configs[CONFIG_COMPRESSION] = sConfig.GetIntDefault("Compression", 1);
- diff --git a/src/game/World.h b/src/game/World.h
- index e4ff977..134240a 100644
- --- a/src/game/World.h
- +++ b/src/game/World.h
- @@ -495,7 +495,12 @@ class World
- static float GetMaxVisibleDistanceInFlight() { return m_MaxVisibleDistanceInFlight; }
- static float GetVisibleUnitGreyDistance() { return m_VisibleUnitGreyDistance; }
- static float GetVisibleObjectGreyDistance() { return m_VisibleObjectGreyDistance; }
- -
- + //movement anticheat
- + static bool GetEnableMvAnticheat() {return m_EnableMvAnticheat;}
- + static uint32 GetTeleportToPlaneAlarms() {return m_TeleportToPlaneAlarms;}
- + static uint32 GetMistimingDelta() {return m_MistimingDelta;}
- + static uint32 GetMistimingAlarms() {return m_MistimingAlarms;}
- + //<<< end movement anticheat
- void ProcessCliCommands();
- void QueueCliCommand( CliCommandHolder::Print* zprintf, char const* input ) { cliCmdQueue.add(new CliCommandHolder(input, zprintf)); }
- @@ -561,7 +566,11 @@ class World
- static float m_MaxVisibleDistanceInFlight;
- static float m_VisibleUnitGreyDistance;
- static float m_VisibleObjectGreyDistance;
- -
- + //movement anticheat enable flag
- + static bool m_EnableMvAnticheat;
- + static uint32 m_TeleportToPlaneAlarms;
- + static uint32 m_MistimingDelta;
- + static uint32 m_MistimingAlarms;
- // CLI command holder to be thread safe
- ACE_Based::LockedQueue<CliCommandHolder*,ACE_Thread_Mutex> cliCmdQueue;
- SqlResultQueue *m_resultQueue;
- diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in
- index ae0ac39..e658153 100644
- --- a/src/mangosd/mangosd.conf.dist.in
- +++ b/src/mangosd/mangosd.conf.dist.in
- @@ -1272,6 +1272,30 @@ Network.OutUBuff = 65536
- Network.TcpNodelay = 1
- ###################################################################################################################
- +# MOVEMENT ANTICHEAT
- +#
- +# Anticheat.Movement.Enable
- +# Enable Movement Anticheat
- +# Default: 1 - on
- +# 0 - off
- +#
- +# Anticheat.Movement.TeleportToPlaneAlarms
- +# maximum alarms before player will be kicked (default 50, allowed 20 - 100)
- +#
- +# Anticheat.Movement.MistimingDelta
- +# mistiming intelval between client and serverside (default 10000 ms, allowed 1000 - 15000 ms)
- +#
- +# Anticheat.Movement.MistimingAlarms
- +# mistiming alarms before player will be kicked (default 20, allowed 10 - 50)
- +#
- +###################################################################################################################
- +
- +Anticheat.Movement.Enable = 1
- +Anticheat.Movement.TeleportToPlaneAlarms = 50
- +Anticheat.Movement.MistimingDelta = 10000
- +Anticheat.Movement.MistimingAlarms = 20
- +
- +###################################################################################################################
- # CONSOLE AND REMOTE ACCESS
- #
- # Console.Enable
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement