From e7687ded09fba37dbffea8693b6d1a240c30a660 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 19 May 2015 12:19:47 +0100 Subject: [PATCH] updated bug when resetting player image. It sent you to origin and you lost instantly --- player.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/player.py b/player.py index 93783de..fabcc99 100644 --- a/player.py +++ b/player.py @@ -37,5 +37,7 @@ class Shooter(pygame.sprite.Sprite): self.set_position(x,y) def reset_image(self): + x,y = self.rect.x, self.rect.y self.image = pygame.transform.scale(self.texture.get_texture("PLAYER"), (self.width, self.height)) - self.rect = self.image.get_rect() \ No newline at end of file + self.rect = self.image.get_rect() + self.set_position(x,y) \ No newline at end of file