diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-06-08 20:02:12 +0200 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-06-08 20:02:12 +0200 |
commit | 5dfc11a78a6838dab14d4acdad65f3fcf13ab89d (patch) | |
tree | 19cc18e285038a5f6d2f8c11b39ee978b07063e2 | |
parent | c991e6cb2cc45acfaf089b4ff35900ca37e64fe9 (diff) |
fix integer size in CltInfo
-rw-r--r-- | serialize.go | 28 | ||||
-rw-r--r-- | tosrvcmds.go | 2 |
2 files changed, 15 insertions, 15 deletions
diff --git a/serialize.go b/serialize.go index f4d932f..ed9c3cb 100644 --- a/serialize.go +++ b/serialize.go @@ -1626,24 +1626,24 @@ func (obj *ToSrvSRPBytesM) deserialize(r io.Reader) { func (obj *ToSrvCltInfo) serialize(w io.Writer) { for local58 := range (*(*(struct { - RenderTargetSize [2]int16 + RenderTargetSize [2]uint32 GUIScaling float32 HUDScaling float32 MaxFormspecInfo [2]float32 }))(obj)).RenderTargetSize { { x := ((*(*(struct { - RenderTargetSize [2]int16 + RenderTargetSize [2]uint32 GUIScaling float32 HUDScaling float32 MaxFormspecInfo [2]float32 }))(obj)).RenderTargetSize)[local58] - write16(w, uint16(x)) + write32(w, uint32(x)) } } { x := (*(*(struct { - RenderTargetSize [2]int16 + RenderTargetSize [2]uint32 GUIScaling float32 HUDScaling float32 MaxFormspecInfo [2]float32 @@ -1652,7 +1652,7 @@ func (obj *ToSrvCltInfo) serialize(w io.Writer) { } { x := (*(*(struct { - RenderTargetSize [2]int16 + RenderTargetSize [2]uint32 GUIScaling float32 HUDScaling float32 MaxFormspecInfo [2]float32 @@ -1660,14 +1660,14 @@ func (obj *ToSrvCltInfo) serialize(w io.Writer) { write32(w, math.Float32bits(x)) } for local59 := range (*(*(struct { - RenderTargetSize [2]int16 + RenderTargetSize [2]uint32 GUIScaling float32 HUDScaling float32 MaxFormspecInfo [2]float32 }))(obj)).MaxFormspecInfo { { x := ((*(*(struct { - RenderTargetSize [2]int16 + RenderTargetSize [2]uint32 GUIScaling float32 HUDScaling float32 MaxFormspecInfo [2]float32 @@ -1679,24 +1679,24 @@ func (obj *ToSrvCltInfo) serialize(w io.Writer) { func (obj *ToSrvCltInfo) deserialize(r io.Reader) { for local60 := range (*(*(struct { - RenderTargetSize [2]int16 + RenderTargetSize [2]uint32 GUIScaling float32 HUDScaling float32 MaxFormspecInfo [2]float32 }))(obj)).RenderTargetSize { { p := &((*(*(struct { - RenderTargetSize [2]int16 + RenderTargetSize [2]uint32 GUIScaling float32 HUDScaling float32 MaxFormspecInfo [2]float32 }))(obj)).RenderTargetSize)[local60] - *p = int16(read16(r)) + *p = read32(r) } } { p := &(*(*(struct { - RenderTargetSize [2]int16 + RenderTargetSize [2]uint32 GUIScaling float32 HUDScaling float32 MaxFormspecInfo [2]float32 @@ -1705,7 +1705,7 @@ func (obj *ToSrvCltInfo) deserialize(r io.Reader) { } { p := &(*(*(struct { - RenderTargetSize [2]int16 + RenderTargetSize [2]uint32 GUIScaling float32 HUDScaling float32 MaxFormspecInfo [2]float32 @@ -1713,14 +1713,14 @@ func (obj *ToSrvCltInfo) deserialize(r io.Reader) { *p = math.Float32frombits(read32(r)) } for local61 := range (*(*(struct { - RenderTargetSize [2]int16 + RenderTargetSize [2]uint32 GUIScaling float32 HUDScaling float32 MaxFormspecInfo [2]float32 }))(obj)).MaxFormspecInfo { { p := &((*(*(struct { - RenderTargetSize [2]int16 + RenderTargetSize [2]uint32 GUIScaling float32 HUDScaling float32 MaxFormspecInfo [2]float32 diff --git a/tosrvcmds.go b/tosrvcmds.go index af1a0bb..9f6a3e6 100644 --- a/tosrvcmds.go +++ b/tosrvcmds.go @@ -167,7 +167,7 @@ type ToSrvSRPBytesM struct { // ToSrvCltInfo tells the server some information about the game window. type ToSrvCltInfo struct { - RenderTargetSize [2]int16 + RenderTargetSize [2]uint32 GUIScaling float32 HUDScaling float32 MaxFormspecInfo [2]float32 |