diff --git a/Source/Contents/Sprites/SpriteLayerDrawing.cpp b/Source/Contents/Sprites/SpriteLayerDrawing.cpp index 8be7ee8ae..d13b02180 100644 --- a/Source/Contents/Sprites/SpriteLayerDrawing.cpp +++ b/Source/Contents/Sprites/SpriteLayerDrawing.cpp @@ -596,7 +596,12 @@ std::pair SpriteLayerRenderer::GetLayerSound(int layer, CActR void SpriteLayerRenderer::DrawLayer( int index, int layer, const ActionFrame* frame, CSprRes* sprite, CActRes* action, int animation, int frameIndex, bool replaced ) { - int cellIndex = GetSlotLayer(g_session.IsSpecialMonsterJob(this->layerViews[layer]) ? 1 : layer); + int cellIndex; + if (g_session.IsSpecialMonsterJob(this->layerViews[layer])) { + cellIndex = GetSlotLayer(1); + } else { + cellIndex = GetSlotLayer(layer); + } for (int i = 0; i < frame->cellCount; ++i) { if (layer == 7) { cellIndex = i; diff --git a/Source/Contents/Sprites/SpriteLayerDrawing.h b/Source/Contents/Sprites/SpriteLayerDrawing.h index 13a67c070..cae46a981 100644 --- a/Source/Contents/Sprites/SpriteLayerDrawing.h +++ b/Source/Contents/Sprites/SpriteLayerDrawing.h @@ -20,8 +20,8 @@ struct SpriteFrameCell; struct SpriteRleImage; struct SpriteLayerResources { - /* 0000 */ CSprRes* sprite; - /* 0004 */ CActRes* action; + /* 0000 */ CSprRes* sprite = nullptr; + /* 0004 */ CActRes* action = nullptr; }; struct SpriteLayerCell {