kivy / cymunk

Cython port of Pymunk
http://readthedocs.org/docs/cymunk/en/latest/
MIT License
45 stars 29 forks source link

Fixed Arbiter contacts getter #46

Closed SleepProgger closed 6 years ago

SleepProgger commented 6 years ago

The Arbiter contacts property returned None after the the first call as the cached contacts weren't returned properly.

Easy to reproduce:

def pre_solve_func(self, space, arbiter):
    print "contacts 1:", arbiter.contacts
    print "contacts 2:", arbiter.contacts

Before:

contacts 1: [Contact(<cymunk.Vec2d x=477.942200 y=8.509947>, <cymunk.Vec2d x=0.000000 y=-1.000000>, -2.980105400085449)]
contacts 2: None

Now:

contacts 1: [Contact(<cymunk.Vec2d x=477.942200 y=8.509947>, <cymunk.Vec2d x=0.000000 y=-1.000000>, -2.980105400085449)]
contacts 2: [Contact(<cymunk.Vec2d x=477.942200 y=8.509947>, <cymunk.Vec2d x=0.000000 y=-1.000000>, -2.980105400085449)]