From dd7a06365c1fef6c2c2a8f4db68037efc66628c6 Mon Sep 17 00:00:00 2001 From: Eric Robinson Date: Fri, 5 Dec 2025 18:04:57 -0500 Subject: [PATCH] Remove unused CMD_ATTACKXY --- Source/msg.cpp | 17 ----------------- Source/msg.h | 4 ---- Source/player.cpp | 5 ----- 3 files changed, 26 deletions(-) diff --git a/Source/msg.cpp b/Source/msg.cpp index 7d21a4d9e..47cf3c5c6 100644 --- a/Source/msg.cpp +++ b/Source/msg.cpp @@ -380,7 +380,6 @@ bool WasPlayerCmdAlreadyRequested(_cmd_id bCmd, Point position = {}, uint16_t wP case _cmd_id::CMD_RATTACKPID: case _cmd_id::CMD_SPELLPID: case _cmd_id::CMD_ATTACKPID: - case _cmd_id::CMD_ATTACKXY: case _cmd_id::CMD_SATTACKXY: case _cmd_id::CMD_RATTACKXY: case _cmd_id::CMD_SPELLXY: @@ -1653,20 +1652,6 @@ size_t OnSyncPutItem(const TCmdPItem &message, Player &player) return sizeof(message); } -size_t OnAttackTile(const TCmdLoc &message, Player &player) -{ - const Point position { message.x, message.y }; - - if (gbBufferMsgs != 1 && player.isOnActiveLevel() && leveltype != DTYPE_TOWN && InDungeonBounds(position)) { - MakePlrPath(player, position, false); - player.destAction = ACTION_ATTACK; - player.destParam1 = position.x; - player.destParam2 = position.y; - } - - return sizeof(message); -} - size_t OnStandingAttackTile(const TCmdLoc &message, Player &player) { const Point position { message.x, message.y }; @@ -3359,8 +3344,6 @@ size_t ParseCmd(uint8_t pnum, const TCmd *pCmd, size_t maxCmdSize) return HandleCmd(OnSyncPutItem, player, pCmd, maxCmdSize); case CMD_SPAWNITEM: return HandleCmd(OnSpawnItem, player, pCmd, maxCmdSize); - case CMD_ATTACKXY: - return HandleCmd(OnAttackTile, player, pCmd, maxCmdSize); case CMD_SATTACKXY: return HandleCmd(OnStandingAttackTile, player, pCmd, maxCmdSize); case CMD_RATTACKXY: diff --git a/Source/msg.h b/Source/msg.h index e2ff12582..124f14bb4 100644 --- a/Source/msg.h +++ b/Source/msg.h @@ -70,10 +70,6 @@ enum _cmd_id : uint8_t { // attempted loot item when inventory is full). // body (TCmdPItem) CMD_SPAWNITEM, - // Attack target location. - // - // body (TCmdLoc) - CMD_ATTACKXY, // Range attack target location. // // body (TCmdLoc) diff --git a/Source/player.cpp b/Source/player.cpp index 35887a8b2..fb1c22341 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -1906,11 +1906,6 @@ void Player::UpdatePreviewCelSprite(_cmd_id cmdId, Point point, uint16_t wParam1 graphic = player_graphic::Attack; break; } - case _cmd_id::CMD_ATTACKXY: - dir = GetDirection(position.tile, point); - graphic = player_graphic::Attack; - minimalWalkDistance = 2; - break; case _cmd_id::CMD_RATTACKXY: case _cmd_id::CMD_SATTACKXY: dir = GetDirection(position.tile, point);