Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed endless bomb drop on disconnect

  • Loading branch information...
commit 7435e3c4c28ae267c43cb072432be53fdda3115c 1 parent cd818a1
@MrJaba authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 controllers/game_controller.rb
View
5 controllers/game_controller.rb
@@ -2,7 +2,7 @@
class GameController < Cramp::Controller::Websocket
periodic_timer :push_states, :every => 0.05
periodic_timer :push_bombs, :every => 0.05
- #periodic_timer :cleanup, :every => 1
+ periodic_timer :cleanup, :every => 1
on_data :receive_message
class << self
attr_accessor :player_states
@@ -54,7 +54,8 @@ def receive_send_bomb_drop(message, uuid)
end
def receive_send_bomb_detonate(message, uuid)
- GameController.bomb_positions.delete(uuid) unless uuid.nil?
+ bomb_id = message['data']
+ GameController.bomb_positions.delete(bomb_id) unless bomb_id.nil?
end
def receive_send_kill_player(message, uuid)
Please sign in to comment.
Something went wrong with that request. Please try again.