Skip to content

Commit

Permalink
Move PreviewNoteField InitCommand later in normal init logic
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Jan 26, 2021
1 parent f2c5bfc commit 0d8c09b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Etterna/Actor/Gameplay/NoteFieldPreview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ REGISTER_ACTOR_CLASS(NoteFieldPreview);
void
NoteFieldPreview::LoadFromNode(const XNode* pNode)
{
ActorFrame::LoadFromNode(pNode);

// fall back to this basic name if no name is set on init
if (m_sName.empty())
SetName("NoteFieldPreview");

int iDrawBefore, iDrawAfter;
const auto b4success = pNode->GetAttrValue("DrawDistanceBeforeTargetsPixels",
iDrawBefore);
Expand Down Expand Up @@ -75,6 +69,12 @@ NoteFieldPreview::LoadFromNode(const XNode* pNode)
return;
}

ActorFrame::LoadFromNode(pNode);

// fall back to this basic name if no name is set on init
if (m_sName.empty())
SetName("NoteFieldPreview");

// This causes crashing if mismatched upon NoteField render
// (only happens when not loading into a 4k compatible Game)
if (p_dummyNoteData->GetNumTracks() != style->m_iColsPerPlayer)
Expand Down

0 comments on commit 0d8c09b

Please sign in to comment.