generated from Persson-dev/Godot-Xmake
add packet declare syntax check
This commit is contained in:
@@ -14,13 +14,19 @@ namespace protocol {
|
||||
*/
|
||||
enum class PacketSenderType {
|
||||
/** Sent by clients and server */
|
||||
Both,
|
||||
Both = 1,
|
||||
/** Sent by clients to the server */
|
||||
Client,
|
||||
/** Sent by server to the clients */
|
||||
Server,
|
||||
};
|
||||
|
||||
enum class PacketSendType {
|
||||
Reliable = 1,
|
||||
Unreliable,
|
||||
UnreliableOrdered,
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* \def DeclareAllPacket
|
||||
|
||||
@@ -14,5 +14,9 @@ void packets::ConcretePacket<PT, Data>::Accept(PacketVisitor& a_Visitor) const {
|
||||
a_Visitor.Visit(*this);
|
||||
}
|
||||
|
||||
#define DeclarePacket(PacketName, packetSendType, packetSenderType) static_assert(static_cast<unsigned>(PacketSendType::packetSendType) && static_cast<unsigned>(PacketSenderType::packetSenderType));
|
||||
|
||||
DeclareAllPacket()
|
||||
|
||||
} // namespace protocol
|
||||
} // namespace blitz
|
||||
|
||||
Reference in New Issue
Block a user