func (o *ObjectData) WriteTo(w io.Writer) (n int64, err error) { var rw must.ReadWriter rw.WriteInt32(w, o.Data) if o.Data != 0 { rw.WriteInt16(w, o.SpeedX) rw.WriteInt16(w, o.SpeedY) rw.WriteInt16(w, o.SpeedZ) } return rw.Result() }