mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-16 08:55:31 +01:00
Initial chat prototype
This commit is contained in:
@@ -6,7 +6,10 @@ import (
|
||||
)
|
||||
|
||||
// MsgSysPositionObject represents the MSG_SYS_POSITION_OBJECT
|
||||
type MsgSysPositionObject struct{}
|
||||
type MsgSysPositionObject struct{
|
||||
ObjID uint32
|
||||
X, Y, Z float32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgSysPositionObject) Opcode() network.PacketID {
|
||||
@@ -15,7 +18,11 @@ func (m *MsgSysPositionObject) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysPositionObject) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.ObjID = bf.ReadUint32()
|
||||
m.X = bf.ReadFloat32()
|
||||
m.Y = bf.ReadFloat32()
|
||||
m.Z = bf.ReadFloat32()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
|
||||
Reference in New Issue
Block a user