proto: Commands 021b and 021c aren't keepalive. Just send an empty packet for now.
This commit is contained in:
parent
37a5a5a944
commit
e5dc6f82ee
@ -116,7 +116,7 @@ char_select(CSocket, GID, Version) ->
|
|||||||
<< _:32, Command:16/unsigned-integer, _/bits >> = Orig,
|
<< _:32, Command:16/unsigned-integer, _/bits >> = Orig,
|
||||||
char_select_handle(Command, CSocket, GID, Version, Orig);
|
char_select_handle(Command, CSocket, GID, Version, Orig);
|
||||||
{error, timeout} ->
|
{error, timeout} ->
|
||||||
egs_proto:send_keepalive(CSocket, GID),
|
egs_proto:send_keepalive(CSocket),
|
||||||
reload,
|
reload,
|
||||||
?MODULE:char_select(CSocket, GID, Version);
|
?MODULE:char_select(CSocket, GID, Version);
|
||||||
{error, closed} ->
|
{error, closed} ->
|
||||||
@ -395,7 +395,7 @@ loop(CSocket, GID, Version, SoFar) ->
|
|||||||
egs_proto:send_chat(CSocket, Version, ChatGID, ChatName, ChatModifiers, ChatMessage),
|
egs_proto:send_chat(CSocket, Version, ChatGID, ChatName, ChatModifiers, ChatMessage),
|
||||||
?MODULE:loop(CSocket, GID, Version, SoFar);
|
?MODULE:loop(CSocket, GID, Version, SoFar);
|
||||||
{psu_keepalive} ->
|
{psu_keepalive} ->
|
||||||
egs_proto:send_keepalive(CSocket, GID),
|
egs_proto:send_keepalive(CSocket),
|
||||||
?MODULE:loop(CSocket, GID, Version, SoFar);
|
?MODULE:loop(CSocket, GID, Version, SoFar);
|
||||||
{psu_player_spawn, Spawn} ->
|
{psu_player_spawn, Spawn} ->
|
||||||
send_spawn(CSocket, GID, Spawn),
|
send_spawn(CSocket, GID, Spawn),
|
||||||
@ -539,11 +539,6 @@ handle(16#0110, CSocket, GID, _, _) ->
|
|||||||
log(GID, "death (and more)"),
|
log(GID, "death (and more)"),
|
||||||
lobby_load(CSocket, GID, 1100000, 0, 4, 6);
|
lobby_load(CSocket, GID, 1100000, 0, 4, 6);
|
||||||
|
|
||||||
%% @doc Keepalive handler. Do nothing.
|
|
||||||
|
|
||||||
handle(16#021c, _, _, _, _) ->
|
|
||||||
ignore;
|
|
||||||
|
|
||||||
%% @doc Uni cube handler.
|
%% @doc Uni cube handler.
|
||||||
|
|
||||||
handle(16#021d, CSocket, _, _, _) ->
|
handle(16#021d, CSocket, _, _, _) ->
|
||||||
|
@ -207,10 +207,11 @@ send_init_quest(CSocket, GID, QuestID) ->
|
|||||||
16#ffffffff:32, 16#ffffffff:32, 16#ffffffff:32, 16#ffffffff:32, 16#ffffffff:32, 16#ffffffff:32, 16#ffffffff:32, 16#ffffffff:32 >>,
|
16#ffffffff:32, 16#ffffffff:32, 16#ffffffff:32, 16#ffffffff:32, 16#ffffffff:32, 16#ffffffff:32, 16#ffffffff:32, 16#ffffffff:32 >>,
|
||||||
packet_send(CSocket, Packet).
|
packet_send(CSocket, Packet).
|
||||||
|
|
||||||
%% @doc Keepalive.
|
%% @doc Keepalive. Just send an empty packet, the game doesn't really care.
|
||||||
|
%% @todo If there's an actual keepalive command, use it instead.
|
||||||
|
|
||||||
send_keepalive(CSocket, GID) ->
|
send_keepalive(CSocket) ->
|
||||||
Packet = << 16#2b1b:16, 0:208, GID:32/little-unsigned-integer, 0:64 >>,
|
Packet = << 0:32 >>,
|
||||||
packet_send(CSocket, Packet).
|
packet_send(CSocket, Packet).
|
||||||
|
|
||||||
%% @doc Make the client load the quest previously sent.
|
%% @doc Make the client load the quest previously sent.
|
||||||
|
Loading…
Reference in New Issue
Block a user