i am REtArd
Fixed a major bug that crashed the clients on chatting + broke a lot of assets because of a single `.` boi anywhere in the filepath.
This commit is contained in:
parent
8791109c66
commit
f30013f7f9
@ -50,6 +50,9 @@ void AOCharMovie::load_image(QString p_char, QString p_emote, QString emote_pref
|
|||||||
movie_delays.clear();
|
movie_delays.clear();
|
||||||
movie_effects.clear();
|
movie_effects.clear();
|
||||||
|
|
||||||
|
if (!file_exists(emote_path))
|
||||||
|
return;
|
||||||
|
|
||||||
m_reader->setFileName(emote_path);
|
m_reader->setFileName(emote_path);
|
||||||
QPixmap f_pixmap = this->get_pixmap(m_reader->read());
|
QPixmap f_pixmap = this->get_pixmap(m_reader->read());
|
||||||
int f_delay = m_reader->nextImageDelay();
|
int f_delay = m_reader->nextImageDelay();
|
||||||
|
@ -527,7 +527,7 @@ QString AOApplication::get_sfx(QString p_identifier)
|
|||||||
|
|
||||||
QString AOApplication::get_sfx_suffix(QString sound_to_check)
|
QString AOApplication::get_sfx_suffix(QString sound_to_check)
|
||||||
{
|
{
|
||||||
if (sound_to_check.contains(".")) //We have what we could call a file extension
|
if (file_exists(sound_to_check))
|
||||||
return sound_to_check;
|
return sound_to_check;
|
||||||
if (file_exists(sound_to_check + ".opus"))
|
if (file_exists(sound_to_check + ".opus"))
|
||||||
return sound_to_check + ".opus";
|
return sound_to_check + ".opus";
|
||||||
@ -542,7 +542,7 @@ QString AOApplication::get_sfx_suffix(QString sound_to_check)
|
|||||||
|
|
||||||
QString AOApplication::get_image_suffix(QString path_to_check)
|
QString AOApplication::get_image_suffix(QString path_to_check)
|
||||||
{
|
{
|
||||||
if (path_to_check.contains(".")) //We have what we could call a file extension
|
if (file_exists(path_to_check))
|
||||||
return path_to_check;
|
return path_to_check;
|
||||||
if (file_exists(path_to_check + ".webp"))
|
if (file_exists(path_to_check + ".webp"))
|
||||||
return path_to_check + ".webp";
|
return path_to_check + ".webp";
|
||||||
|
Loading…
Reference in New Issue
Block a user