From a5788e75857e0347e2e826fb2dfe3ceeaaa5cf80 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Sat, 27 Jul 2024 14:52:36 +1000 Subject: [PATCH] Update StarNetPackets.cpp --- source/game/StarNetPackets.hpp | 2 -- source/game/StarWorldClient.cpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/source/game/StarNetPackets.hpp b/source/game/StarNetPackets.hpp index bfaea6e..26fba1a 100644 --- a/source/game/StarNetPackets.hpp +++ b/source/game/StarNetPackets.hpp @@ -132,7 +132,6 @@ struct Packet { virtual ~Packet(); virtual PacketType type() const = 0; - virtual String const& typeName() const = 0; virtual void readLegacy(DataStream& ds); virtual void read(DataStream& ds) = 0; @@ -156,7 +155,6 @@ struct PacketBase : public Packet { static PacketType const Type = PacketT; PacketType type() const override { return Type; } - String const& typeName() const override { return PacketTypeNames.getRight(Type); } }; struct ProtocolRequestPacket : PacketBase { diff --git a/source/game/StarWorldClient.cpp b/source/game/StarWorldClient.cpp index fba94f3..9e0478a 100644 --- a/source/game/StarWorldClient.cpp +++ b/source/game/StarWorldClient.cpp @@ -751,7 +751,7 @@ void WorldClient::handleIncomingPackets(List const& packets) { for (auto const& packet : packets) { if (!inWorld() && !is(packet)) - Logger::error("WorldClient received packet type {} while not in world", packet->typeName()); + Logger::error("WorldClient received packet type {} while not in world", PacketTypeNames.getRight(packet->type())); if (auto worldStartPacket = as(packet)) { initWorld(*worldStartPacket);