Skip to content

Commit 333a132

Browse files
committed
Fix rubocop offenses
1 parent d9cd770 commit 333a132

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/game_server.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def call_hook(hook_sym, context, optional = nil)
4343

4444
def on_emoticon(chunk, _packet)
4545
msg = ClEmoticon.new(chunk.data[1..])
46-
return if call_hook(:emote, Context.new(msg, chunk:, packet:)).nil?
46+
call_hook(:emote, Context.new(msg, chunk:, packet:)).nil?
4747
end
4848

4949
def on_info(chunk, packet)
@@ -145,7 +145,7 @@ def on_input(chunk, packet)
145145
return if call_hook(:input, Context.new(msg, chunk:, packet:)).nil?
146146

147147
dir = msg.direction
148-
puts "#{packet.client.player.id} tried to move #{dir}" unless dir.zero?
148+
puts "#{packet.client.player.id} tried to move #{dir}" unless dir.zero?
149149
end
150150

151151
def on_client_drop(client, reason = nil)

lib/messages/cl_input.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
#
88
# Client -> Server
99
class ClInput
10-
attr_accessor :ack_game_tick, :prediction_tick, :size, :direction, :target_x, :target_y, :jump, :fire, :hook, :player_flags, :wanted_weapon, :next_weapon, :prev_weapon, :ping
10+
attr_accessor :ack_game_tick, :prediction_tick, :size, :direction, :target_x, :target_y, :jump, :fire, :hook,
11+
:player_flags, :wanted_weapon, :next_weapon, :prev_weapon, :ping
1112

1213
def initialize(hash_or_raw)
1314
if hash_or_raw.instance_of?(Hash)

0 commit comments

Comments
 (0)