Changeset 295:b398b0bc3f17


Ignore:
Timestamp:
Sep 5, 2013, 9:31:00 PM (7 years ago)
Author:
Stefano Rivera <stefano@…>
Branch:
default
rebase_source:
8c989f2510bf87ca47c499f94e5bac62df8ae5a3
Message:

Bullets don't collide with sensors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/game_object.py

    r293 r295  
    353353        self.last_position = position
    354354        for collision in r:
    355             if collision.shape.collision_type == self.source_collision_type:
    356                 continue
    357             if collision.shape == self.physicser.get_shape():
     355            if (collision.shape.collision_type == self.source_collision_type
     356                    or collision.shape == self.physicser.get_shape()
     357                    or collision.shape.sensor):
    358358                continue
    359359            print "Hit", collision.shape.collision_type
Note: See TracChangeset for help on using the changeset viewer.