From 8a8b7afd3be52ec864c9c7b9760456d52b5bc8f4 Mon Sep 17 00:00:00 2001 From: Dan Lawrence Date: Tue, 31 Dec 2024 14:48:26 +0000 Subject: [PATCH] rename 'crashed' dictionary of collided_sprites --- src_py/sprite.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src_py/sprite.py b/src_py/sprite.py index 8f14671b4e..1e6f92add7 100644 --- a/src_py/sprite.py +++ b/src_py/sprite.py @@ -1719,18 +1719,18 @@ def groupcollide(groupa, groupb, dokilla, dokillb, collided=None): that will be used to calculate the collision. """ - crashed = {} + collided_sprites = {} # pull the collision function in as a local variable outside # the loop as this makes the loop run faster sprite_collide_func = spritecollide for group_a_sprite in groupa: collisions = sprite_collide_func(group_a_sprite, groupb, dokillb, collided) if collisions: - crashed[group_a_sprite] = collisions + collided_sprites[group_a_sprite] = collisions if dokilla: - for group_a_sprite in crashed: + for group_a_sprite in collided_sprites: group_a_sprite.kill() - return crashed + return collided_sprites def spritecollideany(sprite, group, collided=None):