diff --git a/Source/monster.cpp b/Source/monster.cpp index 28ab407c6..e9010222d 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -3837,7 +3837,7 @@ void KillMyGolem() { Monster &golem = Monsters[MyPlayerId]; delta_kill_monster(golem, golem.position.tile, *MyPlayer); - NetSendCmdLoc(MyPlayerId, false, CMD_KILLGOLEM, golem.position.tile); + NetSendCmdLocParam1(false, CMD_MONSTDEATH, golem.position.tile, static_cast(golem.getId())); M_StartKill(golem, *MyPlayer); } diff --git a/Source/msg.cpp b/Source/msg.cpp index 357cda999..dedea8ea7 100644 --- a/Source/msg.cpp +++ b/Source/msg.cpp @@ -168,7 +168,6 @@ std::string_view CmdIdString(_cmd_id cmd) case CMD_SPELLXYD: return "CMD_SPELLXYD"; case CMD_ITEMEXTRA: return "CMD_ITEMEXTRA"; case CMD_SYNCPUTITEM: return "CMD_SYNCPUTITEM"; - case CMD_KILLGOLEM: return "CMD_KILLGOLEM"; case CMD_SYNCQUEST: return "CMD_SYNCQUEST"; case CMD_AWAKEGOLEM: return "CMD_AWAKEGOLEM"; case CMD_SETSHIELD: return "CMD_SETSHIELD"; @@ -1769,25 +1768,6 @@ size_t OnMonstDeath(const TCmd *pCmd, Player &player) return sizeof(message); } -size_t OnKillGolem(const TCmd *pCmd, Player &player) -{ - const auto &message = *reinterpret_cast(pCmd); - const Point position { message.x, message.y }; - - if (gbBufferMsgs != 1) { - if (&player != MyPlayer && InDungeonBounds(position)) { - Monster &monster = Monsters[player.getId()]; - if (player.isOnActiveLevel()) - M_SyncStartKill(monster, position, player); - delta_kill_monster(monster, position, player); // BUGFIX: should be p->wParam1, plrlevel will be incorrect if golem is killed because player changed levels - } - } else { - SendPacket(player, &message, sizeof(message)); - } - - return sizeof(message); -} - size_t OnAwakeGolem(const TCmd *pCmd, Player &player) { const auto &message = *reinterpret_cast(pCmd); @@ -3263,8 +3243,6 @@ size_t ParseCmd(uint8_t pnum, const TCmd *pCmd) return OnWarp(pCmd, player); case CMD_MONSTDEATH: return OnMonstDeath(pCmd, player); - case CMD_KILLGOLEM: - return OnKillGolem(pCmd, player); case CMD_AWAKEGOLEM: return OnAwakeGolem(pCmd, player); case CMD_MONSTDAMAGE: diff --git a/Source/msg.h b/Source/msg.h index 2287824c4..3bdac5f66 100644 --- a/Source/msg.h +++ b/Source/msg.h @@ -389,13 +389,6 @@ enum _cmd_id : uint8_t { // // body (TCmdPItem) CMD_SYNCPUTITEM, - // Golem death at location. - // - // body (TCmdLocParam1): - // int8_t x - // int8_t y - // int16_t dlvl - CMD_KILLGOLEM, // Synchronize quest state. // // body (TCmdQuest)