Addition of config for disabling player keyboard movement.
This commit is contained in:
@ -273,6 +273,7 @@ public final class Config
|
||||
public static List<int[]> STARTING_CUSTOM_ITEMS_F = new ArrayList<>();
|
||||
public static List<int[]> STARTING_CUSTOM_ITEMS_M = new ArrayList<>();
|
||||
public static boolean DEEPBLUE_DROP_RULES;
|
||||
public static boolean ENABLE_KEYBOARD_MOVEMENT;
|
||||
public static int UNSTUCK_INTERVAL;
|
||||
public static int DEATH_PENALTY_CHANCE;
|
||||
public static int PLAYER_SPAWN_PROTECTION;
|
||||
@ -1607,6 +1608,7 @@ public final class Config
|
||||
}
|
||||
}
|
||||
|
||||
ENABLE_KEYBOARD_MOVEMENT = Boolean.parseBoolean(otherSettings.getProperty("KeyboardMovement", "true"));
|
||||
UNSTUCK_INTERVAL = Integer.parseInt(otherSettings.getProperty("UnstuckInterval", "300"));
|
||||
|
||||
/* Player protection after teleport or login */
|
||||
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package com.l2jmobius.gameserver.network.clientpackets;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.StopRotation;
|
||||
|
||||
@ -34,6 +35,11 @@ public final class FinishRotating extends L2GameClientPacket
|
||||
@Override
|
||||
protected void runImpl()
|
||||
{
|
||||
if (!Config.ENABLE_KEYBOARD_MOVEMENT)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final L2PcInstance player = getClient().getActiveChar();
|
||||
if (player == null)
|
||||
{
|
||||
|
@ -125,6 +125,10 @@ public class MoveBackwardToLocation extends L2GameClientPacket
|
||||
}
|
||||
else // 0
|
||||
{
|
||||
if (!Config.ENABLE_KEYBOARD_MOVEMENT)
|
||||
{
|
||||
return;
|
||||
}
|
||||
activeChar.setCursorKeyMovement(true);
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package com.l2jmobius.gameserver.network.clientpackets;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.BeginRotation;
|
||||
|
||||
public final class StartRotating extends L2GameClientPacket
|
||||
@ -33,6 +34,11 @@ public final class StartRotating extends L2GameClientPacket
|
||||
@Override
|
||||
protected void runImpl()
|
||||
{
|
||||
if (!Config.ENABLE_KEYBOARD_MOVEMENT)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (getClient().getActiveChar() == null)
|
||||
{
|
||||
return;
|
||||
|
Reference in New Issue
Block a user