pythonverse

Python-based client for OpenVerse with extra features
git clone https://code.literati.org/pythonverse.git
Log | Files | Refs | README | LICENSE

commit 98994749589045d00246cf1459c70e9bc2bece6f
parent ad4cfaca6906df855392ae0e016e9df57d3e1a7d
Author: renze <renze>
Date:   Thu, 17 Jan 2002 08:39:09 +0000

minor bug fixes - hopefully the end of the rare zero length text bug

Diffstat:
Mpvui_pygame.py | 13++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/pvui_pygame.py b/pvui_pygame.py @@ -31,10 +31,8 @@ def wrap_lines(lines, width, font): for text in lines: r.extend(wrap(text, width, font)) - c = 0 - for t in r: - if t == "": del r[c] - c = c + 1 + for t in range(len(r)): + if r[t] == "": del r[t] return r @@ -357,8 +355,9 @@ class Avatar(Sprite): self.pollme = 1 def effect(self, action): - self.effects.append(action) - self.pollme = 1 + if action == 'jump' or action == 'shiver': + self.effects.append(action) + self.pollme = 1 def poll(self, t): """Move the avatar if necessary""" @@ -413,7 +412,7 @@ class Avatar(Sprite): if self.effect_count > 0: self.effect_step = 6 self.rect.center = (x, y) - pygame.time.wait(15) + pygame.time.delay(15) self.effect_step = self.effect_step -1 self.effect_count = self.effect_count -1 if self.effect_count == -1: