Rewrite attack handling. (This isn't intended to be fast or scalable--the
old code wasn't, either--I just want to get rid of the extra DrawActor code path. This feature should probably just be removed.)
This commit is contained in:
@@ -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" );
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user