mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-04 16:49:11 +00:00
Fix doors opening when clicked, instead of when walked to.
This commit is contained in:
@@ -26,9 +26,7 @@ end
|
||||
# MessageListener for opening and closing doors.
|
||||
on :message, :first_object_action do |player, message|
|
||||
if DoorUtil::is_door?(message.id)
|
||||
puts "Player: #{player.position}, door: #{message.position}"
|
||||
door = DoorUtil::get_door_object(message.position, message.id)
|
||||
DoorUtil::toggle(door) unless door.nil?
|
||||
# player.start_action(OpenDoorAction.new(player, door)) unless door.nil?
|
||||
player.start_action(OpenDoorAction.new(player, door)) unless door.nil?
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user