diff --git a/gameview.py b/gameview.py index 2922700..8ef58ee 100644 --- a/gameview.py +++ b/gameview.py @@ -333,7 +333,7 @@ class AOCharMovie(QtGui.QLabel): original_path = test_path( AOpath+"characters/"+p_char+"/"+emote_prefix+p_emote+".gif", - AOpath+"characters/"+p_char+"/"+emote_prefix+p_emote+".gif", + AOpath+"characters/"+p_char+"/"+emote_prefix+"/"+p_emote+".gif", AOpath+"characters/"+p_char+"/"+p_emote+".gif", AOpath+"characters/"+p_char+"/(a)"+p_emote+".gif" ) @@ -396,6 +396,7 @@ class AOCharMovie(QtGui.QLabel): if exists(placeholder_path): gif_path = placeholder_path + print "[debug] Sprite not found: ", p_char, p_emote, emote_prefix, original_path, alt_path, apng_path else: gif_path = "" self.use_pillow = 0 @@ -406,6 +407,7 @@ class AOCharMovie(QtGui.QLabel): if gif_path == "": if exists(placeholder_path): gif_path = placeholder_path + print "[debug] Sprite not found: ", p_char, p_emote, emote_prefix, original_path, alt_path, apng_path else: gif_path = "" else: @@ -2769,6 +2771,9 @@ class GUI(QtGui.QWidget): f_char = m_chatmessage[CHARNAME] evidence = int(m_chatmessage[EVIDENCE])-1 + # Some characters use " - " instead of "-" for no preanim. + m_chatmessage[PREANIM] = m_chatmessage[PREANIM].strip() + t = time.localtime() logcharname = f_char @@ -3000,6 +3005,7 @@ class GUI(QtGui.QWidget): side = self.m_chatmessage[SIDE] emote_mod = int(self.m_chatmessage[EMOTE_MOD]) + no_preanim = not self.m_chatmessage[PREANIM] or self.m_chatmessage[PREANIM] == "-" # AO 2.8: always offset player hor_offset = vert_offset = 0 @@ -3111,15 +3117,15 @@ class GUI(QtGui.QWidget): # self.play_sfx() self.set_desk(True) self.play_preanim(False) - elif emote_mod == 0 or emote_mod == 5 or self.m_chatmessage[PREANIM] == "-": - if self.m_chatmessage[NO_INTERRUPT] == "0" or self.m_chatmessage[PREANIM] == "-": + elif emote_mod == 0 or emote_mod == 5 or no_preanim: + if self.m_chatmessage[NO_INTERRUPT] == "0" or no_preanim: self.handle_chatmessage_3() else: self.play_preanim(True) def play_preanim(self, noninterrupting): f_char = self.m_chatmessage[CHARNAME].lower() - f_preanim = self.m_chatmessage[PREANIM] + f_preanim = self.m_chatmessage[PREANIM].strip() ao2_duration = ini.read_ini_int(AOpath+"characters/"+f_char+"/char.ini", "time", f_preanim, -1) text_delay = ini.read_ini_int(AOpath+"characters/"+f_char+"/char.ini", "textdelay", f_preanim, -1)