enigma-dev/enigma-dev — pull request #11 by forthevin (2012-08-05 18:13:23+00:00)
Title: Changed collision event to support multiple collisions.

The previous handling of collision events only performed each event for the first colliding instance, instead of performing an event for all colliding instances. This fix performs an event for all instances that the given instance collides with. Furthermore, if the position of any of the involved instances changes as a result of one or more performances of the event during collision handling, the collision detection uses the new positions.

The fix is a bit hacky, in that it moves assignment inside the condition of an if-statement.

I don't know if the fix works correctly in regards to instance creation or destruction during the collision phase. Someone who understands creation, destruction and iterators should probably look at the fix before accepting this request. The fix has of this writing been tested in one game.