comparison pytouhou/game/enemy.pyx @ 492:887de1309491

Add friendly fire in netplay.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 21 Sep 2013 20:26:39 +0200
parents 2f53be1b2f60
children 6be9c99a3a24
comparison
equal deleted inserted replaced
491:2276229282fd 492:887de1309491
334 for laser in self._game.players_lasers: 334 for laser in self._game.players_lasers:
335 if not laser: 335 if not laser:
336 continue 336 continue
337 337
338 half_size[0] = laser.hitbox[0] 338 half_size[0] = laser.hitbox[0]
339 half_size[1] = laser.hitbox[1]
340 lx, ly = laser.x, laser.y * 2. 339 lx, ly = laser.x, laser.y * 2.
341 lx1, lx2 = lx - half_size[0], lx + half_size[0] 340 lx1, lx2 = lx - half_size[0], lx + half_size[0]
342 341
343 if not (lx2 < ex1 or lx1 > ex2 342 if not (lx2 < ex1 or lx1 > ex2
344 or ly < ey1): 343 or ly < ey1):