lib/AdventureRL/Modifiers/Solid.rb in adventure_rl-0.0.1.pre.ld42 vs lib/AdventureRL/Modifiers/Solid.rb in adventure_rl-0.0.2

- old
+ new

@@ -116,10 +116,10 @@ # This is a bit of a hacky workaround for some # weird Pusher behavior with Velocity and Gravity. previous_precision_over_performance = @precision_over_performance.dup opts = args.last.is_a?(Hash) ? args.last : nil - @precision_over_performance = opts[:precision_over_performance] if (opts.key? :precision_over_performance) + @precision_over_performance = opts[:precision_over_performance] if (opts && opts.key?(:precision_over_performance)) if ([:highest].include? @precision_over_performance) move_by_steps incremental_position else @position[:x] += incremental_position[:x] if (incremental_position.key? :x)