diff pytouhou/game/player.pyx @ 502:3d3285918ba1

Disallow collection of items dropped by the other player in netplay, also fixes a longstanding bug where autocollection worked with those items.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 23 Oct 2013 18:24:08 +0200
parents c9c2fb873dbd
children 292fea5c584e
line wrap: on
line diff
--- a/pytouhou/game/player.pyx
+++ b/pytouhou/game/player.pyx
@@ -260,7 +260,7 @@ cdef class Player(Element):
                     self.continues_used += 1
 
                     for i in xrange(5):
-                        self._game.drop_bonus(self.x, self.y, 4,
+                        self._game.drop_bonus(self.x, self.y, 4, player=self,
                                               end_pos=(self._game.prng.rand_double() * 288 + 48,
                                                        self._game.prng.rand_double() * 192 - 64))
                     self.score = 0
@@ -272,11 +272,11 @@ cdef class Player(Element):
                     self.graze = 0
                     self.points = 0
                 else:
-                    self._game.drop_bonus(self.x, self.y, 2,
+                    self._game.drop_bonus(self.x, self.y, 2, player=self,
                                           end_pos=(self._game.prng.rand_double() * 288 + 48, # 102h.exe@0x41f3dc
                                                    self._game.prng.rand_double() * 192 - 64))        # @0x41f3
                     for i in xrange(5):
-                        self._game.drop_bonus(self.x, self.y, 0,
+                        self._game.drop_bonus(self.x, self.y, 0, player=self,
                                               end_pos=(self._game.prng.rand_double() * 288 + 48,
                                                        self._game.prng.rand_double() * 192 - 64))