Created
October 26, 2011 04:19
-
-
Save legumbre/1315418 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Ring:disconnect_ring(other_ring) | |
| local mapEntry= self.other_rings[other_ring] | |
| local tangent= mapEntry.tangent | |
| klog.debug("DISCONNECTING %s(%s) -> %s(%s) ", self.id, tostring(self), other_ring.id, tostring(other_ring), tostring(mapEntry.tangent)) | |
| if not mapEntry then | |
| log.warning("Trying to disconnect %d from %d but no previous connection existed", self.id, other_ring.id) | |
| end | |
| self.other_rings[other_ring]= nil -- other_ring is not mapped anymore | |
| tangent.other_ring=NULL | |
| -- tangent.next_ring_distance_cw=100000 | |
| -- tangent.next_ring_distance_ccw=100000 | |
| -- we need to recalc the tangent distances now that we've | |
| -- disconnected the ring (some tangents are not there anymore) | |
| other_ring:calc_tangent_distances() | |
| -- BBB other info we want to delete? | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment