comparison 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
comparison
equal deleted inserted replaced
501:4778c482f24a 502:3d3285918ba1
258 if self.continues >= 0: 258 if self.continues >= 0:
259 self.continues -= 1 259 self.continues -= 1
260 self.continues_used += 1 260 self.continues_used += 1
261 261
262 for i in xrange(5): 262 for i in xrange(5):
263 self._game.drop_bonus(self.x, self.y, 4, 263 self._game.drop_bonus(self.x, self.y, 4, player=self,
264 end_pos=(self._game.prng.rand_double() * 288 + 48, 264 end_pos=(self._game.prng.rand_double() * 288 + 48,
265 self._game.prng.rand_double() * 192 - 64)) 265 self._game.prng.rand_double() * 192 - 64))
266 self.score = 0 266 self.score = 0
267 self.effective_score = 0 267 self.effective_score = 0
268 self.lives = 2 #TODO: use the right default. 268 self.lives = 2 #TODO: use the right default.
270 self.power = 0 270 self.power = 0
271 271
272 self.graze = 0 272 self.graze = 0
273 self.points = 0 273 self.points = 0
274 else: 274 else:
275 self._game.drop_bonus(self.x, self.y, 2, 275 self._game.drop_bonus(self.x, self.y, 2, player=self,
276 end_pos=(self._game.prng.rand_double() * 288 + 48, # 102h.exe@0x41f3dc 276 end_pos=(self._game.prng.rand_double() * 288 + 48, # 102h.exe@0x41f3dc
277 self._game.prng.rand_double() * 192 - 64)) # @0x41f3 277 self._game.prng.rand_double() * 192 - 64)) # @0x41f3
278 for i in xrange(5): 278 for i in xrange(5):
279 self._game.drop_bonus(self.x, self.y, 0, 279 self._game.drop_bonus(self.x, self.y, 0, player=self,
280 end_pos=(self._game.prng.rand_double() * 288 + 48, 280 end_pos=(self._game.prng.rand_double() * 288 + 48,
281 self._game.prng.rand_double() * 192 - 64)) 281 self._game.prng.rand_double() * 192 - 64))
282 282
283 elif time == 7: 283 elif time == 7:
284 self.sprite.mirrored = False 284 self.sprite.mirrored = False