]> git.lizzy.rs Git - mt.git/blobdiff - tocltcmds.go
Add WaitGroup to SerializePkt
[mt.git] / tocltcmds.go
index 4a1045de76673e921e0bc20e6deb6a6c8b188cb1..54ab78853c83df2abd9531d4ad52b042a9d19e9b 100644 (file)
@@ -122,7 +122,9 @@ func (cmd ToCltKick) String() (msg string) {
 // ToCltBlkData tells the client the contents of a nearby MapBlk.
 type ToCltBlkData struct {
        Blkpos [3]int16
-       Blk    MapBlk
+       //mt:zstd
+       Blk MapBlk
+       //mt:end
 }
 
 // ToCltAddNode tells the client that a nearby node changed
@@ -231,6 +233,8 @@ type ToCltAOMsgs struct {
 // ToCltHP updates the player's HP on the client.
 type ToCltHP struct {
        HP uint16
+       //mt:opt
+       DamageEffect bool
 }
 
 // ToCltMovePlayer tells the client that the player has been moved server-side.
@@ -429,7 +433,7 @@ type HUD struct {
        Size     [2]int32
        ZIndex   int16
        Text2    string
-       Style uint32
+       Style    HUDStyleFlags
 }
 
 type HUDID uint32
@@ -756,7 +760,7 @@ type ToCltMinimapModes struct {
 
 var _ serializer = (*ToCltMinimapModes)(nil)
 
-func (cmd *ToCltMinimapModes) serialize(w io.Writer) {
+func (cmd *ToCltMinimapModes) Serialize(w io.Writer) {
        buf := make([]byte, 4)
        if len(cmd.Modes) > math.MaxUint16 {
                chk(ErrTooLong)
@@ -772,7 +776,7 @@ func (cmd *ToCltMinimapModes) serialize(w io.Writer) {
 
 var _ deserializer = (*ToCltMinimapModes)(nil)
 
-func (cmd *ToCltMinimapModes) deserialize(r io.Reader) {
+func (cmd *ToCltMinimapModes) Deserialize(r io.Reader) {
        buf := make([]byte, 4)
        _, err := io.ReadFull(r, buf)
        chk(err)