From 1ad7cfae4d73434ad94eab601b77ce4eede534fa Mon Sep 17 00:00:00 2001 From: Terncode Date: Tue, 17 Nov 2026 18:52:40 +0100 Subject: [PATCH] Fix entity placing checks --- src/ts/server/serverActions.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/ts/server/serverActions.ts b/src/ts/server/serverActions.ts index 30143a2..fe69f26 100644 --- a/src/ts/server/serverActions.ts +++ b/src/ts/server/serverActions.ts @@ -290,6 +290,11 @@ export class ServerActions implements IServerActions, SocketServer { case Action.RemoveEntity: { validateNumber(param, 'param'); this.updateLastAction(); + + if (this.client.isSwitchingMap) { + return; + } + const entity = this.world.getEntityById(param | 0); if ( @@ -316,9 +321,15 @@ export class ServerActions implements IServerActions, SocketServer { this.updateLastAction(); + if (this.client.isSwitchingMap) { + return; + } + const { x, y, type } = param as { x: number; y: number; type: number; }; if ( + this.pony.options!.hold !== entities.hammer.type || + distanceXY(x, y, this.pony.x, this.pony.y) > TILE_CHANGE_RANGE || isOutsideMap(x, y, this.map) || !entities.placeableEntities.some(x => x.type === type) || !hasFlag(this.map.flags, MapFlags.EditableEntities)