G'day Bryan,

On each struct line, the comment string that contains "py-struct" is for
automatic source code generation of the Python code, using the C code as
input.  You can find more information on the format character string
"!bbbxhxx" by reading the Python struct module documentation at:


The format string is the Python way of describing the data structure,
and the lines that are inside the braces of the C data structure define
the structure for C programmes.

The "char type" at the start of every packet does not form part of the
packet data, but is instead used to differentiate the packet from other
packets.  Line 117 of include/packets.h says this.

The exact content of every packet is not currently documented, but I'm
happy to add that documentation when it is needed.

The usual way to understand the packet content is to play the game whil
reading a packet trace.  The Python client has a --dump-server option
for that.

"war" is probably a bit mask of teams the torpedo is hostile toward.

"status" is one of the predefined status codes for torpedos, you can
find a list in another include file.  Search for TFREE in struct.h to
see the state explanations.  It would be redundant to add the
explanations to the packet structure.

TFREE means the torpedo array entry is empty, it represents no torpedo.

I didn't design these structures, by the way.

Structure members labelled pad are for aligning the data stream to four
byte boundaries for network and CPU efficiency.

James Cameron