forked from SilverStudioGames/WTS
Bug fix
* Fixed stale images being displayed when threading is enabled and no image was called in a while
This commit is contained in:
parent
b41a4263ea
commit
ebc865b798
@ -155,25 +155,25 @@ init python:
|
||||
def _image(self, st, at):
|
||||
return self._sprite.get_with_default(Null()), None
|
||||
|
||||
def is_stale(self):
|
||||
curr_hash = self.generate_hash()
|
||||
stale = curr_hash != self._hash
|
||||
self._hash = curr_hash
|
||||
|
||||
if stale and settings.get("multithreading"):
|
||||
self.build_image()
|
||||
return stale
|
||||
|
||||
@property
|
||||
def image(self):
|
||||
if not renpy.is_skipping() and self.is_stale():
|
||||
|
||||
if renpy.showing(get_character_tag(self.name), layer=self.layer):
|
||||
self.show()
|
||||
|
||||
if settings.get("multithreading"):
|
||||
|
||||
if not renpy.is_skipping() and self.is_stale():
|
||||
self.build_image()
|
||||
|
||||
if renpy.showing(get_character_tag(self.name), layer=self.layer):
|
||||
self.show()
|
||||
# elif renpy.in_rollback():
|
||||
# self.build_image()
|
||||
|
||||
return DynamicDisplayable(self._image)
|
||||
else:
|
||||
if not renpy.is_skipping() and self.is_stale():
|
||||
|
||||
if renpy.showing(get_character_tag(self.name), layer=self.layer):
|
||||
self.show()
|
||||
|
||||
return self._build_image(self._hash)
|
||||
|
||||
def equip(self, obj, remove_old=True):
|
||||
|
Loading…
Reference in New Issue
Block a user