lib/sc2ai/protocol/extensions/point.rb in sc2ai-0.0.5 vs lib/sc2ai/protocol/extensions/point.rb in sc2ai-0.0.7
- old
+ new
@@ -1,10 +1,12 @@
module Api
# Adds additional functionality to message object Api::Point
module PointExtension
# @private
def hash
- [x, y, z].hash
+ # Only one plane is ever used. Ignore hashing on z
+ # [x, y, z].hash
+ [x, y].hash
end
def eql?(other)
self.class == other.class && hash == other.hash
end