Skip to content

Commit

Permalink
Fix asinine bug in physics force resetting
Browse files Browse the repository at this point in the history
Would only hit this if an extra frame was being processed.
  • Loading branch information
jonathanhogg committed Sep 11, 2024
1 parent 501a0c3 commit 1b68638
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/flitter/render/physics.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,7 @@ cdef class PhysicsSystem:
m = PyList_GET_SIZE(groups)
for i in range(m):
groupptr = PyList_GET_ITEM(groups, i)
o = PyList_GET_SIZE((<PhysicsGroup>groupptr).non_anchors)
for j in range(o):
to_particle = PyList_GET_ITEM((<PhysicsGroup>groupptr).non_anchors, j)
(<Particle>to_particle).reset_force()
Expand Down

0 comments on commit 1b68638

Please sign in to comment.