Update StarNetPackets.cpp

This commit is contained in:
Kae 2024-07-27 14:52:36 +10:00
parent 951fe787c4
commit a5788e7585
2 changed files with 1 additions and 3 deletions

View File

@ -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<PacketType::ProtocolRequest> {

View File

@ -751,7 +751,7 @@ void WorldClient::handleIncomingPackets(List<PacketPtr> const& packets) {
for (auto const& packet : packets) {
if (!inWorld() && !is<WorldStartPacket>(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<WorldStartPacket>(packet)) {
initWorld(*worldStartPacket);