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);