From 32f4a0b98709d277eac5fb99bac4100467d54aa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 26 May 2010 11:27:51 +0200 Subject: [PATCH] game: Channel must not be changed when broadcasting. --- src/egs_game.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/egs_game.erl b/src/egs_game.erl index 3c443e1..6f6bc70 100644 --- a/src/egs_game.erl +++ b/src/egs_game.erl @@ -309,8 +309,8 @@ loop(CSocket, GID, Version) -> loop(CSocket, GID, Version, SoFar) -> receive {psu_broadcast, Packet} -> - << A:16/bits, _:8, B:40/bits, _:32, C:96/bits, _:64, D/bits >> = Packet, - Broadcast = << A/binary, 3, B/binary, 16#00011300:32, C/binary, 16#00011300:32, GID:32/little-unsigned-integer, D/binary >>, + << A:64/bits, _:32, B:96/bits, _:64, C/bits >> = Packet, + Broadcast = << A/binary, 16#00011300:32, B/binary, 16#00011300:32, GID:32/little-unsigned-integer, C/binary >>, egs_proto:packet_send(CSocket, Broadcast), ?MODULE:loop(CSocket, GID, Version, SoFar); {psu_chat, ChatGID, ChatName, ChatModifiers, ChatMessage} -> @@ -363,7 +363,7 @@ dispatch(CSocket, GID, Version, Packet) -> broadcast(16#0503, GID, Packet) -> LID = 0, % TODO: handle the LID correctly << 100:32/little-unsigned-integer, 16#050301:24/unsigned-integer, _:40, 0:32, GID:32/little-unsigned-integer, 0:192, - GID:32/little-unsigned-integer, LID:32/little-unsigned-integer, Direction:32/bits, _:96, Coords:96/bits, + GID:32/little-unsigned-integer, LID:32/little-unsigned-integer, Direction:32/bits, Coords:96/bits, _:96, Quest:32/little-unsigned-integer, MapType:32/little-unsigned-integer, MapNumber:32/little-unsigned-integer, MapEntry:32/little-unsigned-integer, _:16, 0:16 >> = Packet, User = egs_db:users_select(GID),