Fixed many non-critical exceptions

Fixed an issue that could result in server hang
Added a new command ::npcsearch for searching for NPC IDs
This commit is contained in:
Ceikry
2023-02-18 01:37:30 +00:00
committed by Ryan
parent d75e40b98c
commit cecd6f1947
11 changed files with 60 additions and 25 deletions
@@ -194,6 +194,8 @@ public abstract class MovementPulse extends Pulse {
Location ml = mover.getLocation();
// Allow being within 1 square of moving entities to interact with them.
int radius = destination instanceof Entity && ((Entity)destination).getWalkingQueue().hasPath() ? 1 : 0;
if (interactLocation == null)
return false;
if (Math.max(Math.abs(ml.getX() - interactLocation.getX()), Math.abs(ml.getY() - interactLocation.getY())) <= radius) {
try {
if (near || pulse()) {