diff --git a/src/framework/sound/soundmanager.cpp b/src/framework/sound/soundmanager.cpp index fd4b5c6f..743d4417 100644 --- a/src/framework/sound/soundmanager.cpp +++ b/src/framework/sound/soundmanager.cpp @@ -29,6 +29,7 @@ #include #include +#include SoundManager g_sounds; @@ -163,7 +164,7 @@ void SoundManager::playMusic(const std::string& filename, float fadetime) { if(m_currentMusic == filename && m_musicSource) return; - m_currentMusic = filename; + m_currentMusic = g_resources.resolvePath(filename); if(!m_musicEnabled) return; diff --git a/src/otclient/spritemanager.h b/src/otclient/spritemanager.h index 235b79b8..f14b88a6 100644 --- a/src/otclient/spritemanager.h +++ b/src/otclient/spritemanager.h @@ -47,6 +47,7 @@ private: Boolean m_loaded; uint32 m_signature; int m_spritesCount; + int m_spritesOffset; FileStreamPtr m_spritesFile; }; diff --git a/src/otclient/thingtypedat.cpp b/src/otclient/thingtypedat.cpp index c0522030..1fff11c7 100644 --- a/src/otclient/thingtypedat.cpp +++ b/src/otclient/thingtypedat.cpp @@ -47,11 +47,6 @@ void ThingTypeDat::unserialize(uint16 clientId, DatCategory category, const File m_id = clientId; m_category = category; - - static int datVersion; - if(clientId == 100 && category == DatItemCategory) - datVersion = 2; - bool done = false; for(int i = 0 ; i < DatLastAttrib;++i) { int attrib = fin->getU8(); @@ -60,12 +55,7 @@ void ThingTypeDat::unserialize(uint16 clientId, DatCategory category, const File break; } - // hacky way to detect if is older dat version or not - if(clientId == 100 && category == DatItemCategory && datVersion != 1 && - (attrib == DatAttribNotPathable || attrib == DatAttribDontHide || attrib == DatAttribIgnoreLook)) { - datVersion = 1; - } - if(datVersion <= 1) { + if(g_game.getFeature(Otc::GameChargeableItems)) { if(attrib == DatAttribWritable) { m_attribs.set(DatAttribChargeable, true); continue; @@ -135,7 +125,7 @@ void ThingTypeDat::unserialize(uint16 clientId, DatCategory category, const File m_spritesIndex.resize(totalSprites); for(int i = 0; i < totalSprites; i++) - m_spritesIndex[i] = fin->getU16(); + m_spritesIndex[i] = g_game.getFeature(Otc::GameSpritesU32) ? fin->getU32() : fin->getU16(); m_textures.resize(m_animationPhases); m_texturesFramesRects.resize(m_animationPhases);