2010/9/24 Mike Wyatt <[email protected]>: > CocosNode's do() function does a deep copy of the action. This is > causing a problem with my AStarMove action, which takes a reference to > an A* node graph. For a larger graph (like 64x64 cells in a grid), > the recursive copy hits the max recursion limit and throws an > exception. > > So, what is the best way to avoid this? Can the deep copy be made > optional, or is there an important reason for it to always happen?
Implement the __deepcopy__ method on your object to only copy what really needs to be (maybe the graph doesn't need to be copied) or to copy it more intelligently. See http://docs.python.org/library/copy.html for details. > Or, I could attach the graph object after calling do(), but that seems > hacky. > > Thoughts? > > -- > You received this message because you are subscribed to the Google Groups > "cocos2d discuss" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/cocos-discuss?hl=en. > > -- La brigade SnW veut vous recruter - http://www.brigadesnw.com -- You received this message because you are subscribed to the Google Groups "cocos2d discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/cocos-discuss?hl=en.
