Ignore input packets from clients
This commit is contained in:
parent
e9dc1ae75f
commit
15139ceb68
|
@ -62,4 +62,13 @@ class GameServer
|
|||
@server.send_server_info(packet.client, ServerInfo.new.to_a)
|
||||
@server.send_game_info(packet.client, GameInfo.new.to_a)
|
||||
end
|
||||
|
||||
def on_input(chunk, packet)
|
||||
# vanilla server responds to input with 2 chunks
|
||||
# - input_timing
|
||||
# - snap (empty)
|
||||
|
||||
# we do nothing for now
|
||||
# TODO: do something
|
||||
end
|
||||
end
|
||||
|
|
|
@ -98,6 +98,8 @@ class TeeworldsServer
|
|||
@game_server.on_ready(chunk, packet)
|
||||
when NETMSG_ENTERGAME
|
||||
@game_server.on_enter_game(chunk, packet)
|
||||
when NETMSG_INPUT
|
||||
@game_server.on_input(chunk, packet)
|
||||
else
|
||||
puts "Unsupported system msg: #{chunk.msg}"
|
||||
exit(1)
|
||||
|
|
Loading…
Reference in a new issue