Changeset 84:6de531d648c3


Ignore:
Timestamp:
Apr 4, 2011, 12:01:49 PM (9 years ago)
Author:
Jeremy Thurgood <firxen@…>
Branch:
default
Message:

Exclude scenery sprites from collision detection.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/physics.py

    r83 r84  
    9999        if sprite.mobile:
    100100            self._mobiles.add(sprite)
    101         else:
     101        elif (sprite.floor or sprite.block):
    102102            self._immobiles.add(sprite)
    103103        if sprite.gravitates:
     
    131131                    collide((sprite1, sprite2))
    132132            for sprite2 in self._immobiles.sprites():
    133                 if (sprite2.floor or sprite2.block) and spritecollide(sprite2):
     133                if spritecollide(sprite2):
    134134                    collide((sprite1, sprite2))
    135135        self.dispatch_collisions(collisions)
Note: See TracChangeset for help on using the changeset viewer.