Ignore input packets from clients

This commit is contained in:
ChillerDragon 2022-11-12 11:38:46 +01:00
parent e9dc1ae75f
commit 15139ceb68
2 changed files with 11 additions and 0 deletions

View file

@ -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

View file

@ -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)