diff --git a/stepmania/src/NoteDisplay.cpp b/stepmania/src/NoteDisplay.cpp index 5346493718..716b182333 100644 --- a/stepmania/src/NoteDisplay.cpp +++ b/stepmania/src/NoteDisplay.cpp @@ -1010,7 +1010,20 @@ void NoteDisplay::DrawTap( const TapNote& tn, int iCol, float fBeat, bool bOnSam bUseLighting = cache->m_bTapNoteUseLighting; } + if( tn.type == TapNote::attack ) + { + Lua *L = LUA->Get(); + LuaTable tab; + LuaHelpers::Push( L, tn.sAttackModifiers ); + tab.Set( L, "Modifiers" ); + pActor->PlayCommand( "SetAttack", &tab ); + LUA->Release( L ); + } + DrawActor( tn, pActor, iCol, fBeat, bIsAddition, fPercentFadeToFail, fLife, fReverseOffsetPixels, bUseLighting, part, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar ); + + if( tn.type == TapNote::attack ) + pActor->PlayCommand( "UnsetAttack" ); } /* diff --git a/stepmania/src/NoteField.cpp b/stepmania/src/NoteField.cpp index 7f54476a99..4f975ccd1b 100644 --- a/stepmania/src/NoteField.cpp +++ b/stepmania/src/NoteField.cpp @@ -858,20 +858,8 @@ void NoteField::DrawPrimitives() bool bIsAddition = (tn.source == TapNote::addition); bool bIsHopoPossible = (tn.bHopoPossible); bool bUseAdditionColoring = bIsAddition || bIsHopoPossible; - bool bIsAttack = (tn.type == TapNote::attack); NoteDisplayCols *displayCols = tn.pn == PLAYER_INVALID ? m_pCurDisplay : m_pDisplays[tn.pn]; - - if( bIsAttack ) - { - Sprite sprite; - sprite.Load( THEME->GetPathG("NoteField","attack "+tn.sAttackModifiers) ); - float fBeat = NoteRowToBeat(i); - displayCols->display[c].DrawActor( tn, &sprite, c, fBeat, bUseAdditionColoring, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail, 1, m_fYReverseOffsetPixels, false, NotePart_Tap, iDrawDistanceBeforeTargetsPixels, FADE_BEFORE_TARGETS_PERCENT ); - } - else - { - displayCols->display[c].DrawTap( tn, c, NoteRowToBeat(i), bHoldNoteBeginsOnThisBeat, bUseAdditionColoring, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail, 1, m_fYReverseOffsetPixels, iDrawDistanceBeforeTargetsPixels, FADE_BEFORE_TARGETS_PERCENT ); - } + displayCols->display[c].DrawTap( tn, c, NoteRowToBeat(i), bHoldNoteBeginsOnThisBeat, bUseAdditionColoring, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail, 1, m_fYReverseOffsetPixels, iDrawDistanceBeforeTargetsPixels, FADE_BEFORE_TARGETS_PERCENT ); } }