diff --git a/src/core/application.cpp b/src/core/application.cpp index a65f2135..79bc6c7f 100644 --- a/src/core/application.cpp +++ b/src/core/application.cpp @@ -6612,7 +6612,7 @@ void Application::spawnOnlinePlayer(uint64_t guid, } pipeline::M2Model model = pipeline::M2Loader::load(m2Data); - if (!model.isValid() || model.vertices.empty()) { + if (model.vertices.empty()) { LOG_WARNING("spawnOnlinePlayer: failed to parse M2: ", m2Path); return; } @@ -6624,6 +6624,12 @@ void Application::spawnOnlinePlayer(uint64_t guid, pipeline::M2Loader::loadSkin(skinData, model); } + // After skin loading, full model must be valid (vertices + indices) + if (!model.isValid()) { + LOG_WARNING("spawnOnlinePlayer: failed to load skin for M2: ", m2Path); + return; + } + // Load only core external animations (stand/walk/run) to avoid stalls for (uint32_t si = 0; si < model.sequences.size(); si++) { if (!(model.sequences[si].flags & 0x20)) {