Messages and commands are nearly identical: they both have a name,
they can both have parameters stashed in a table, and they both play stuff out of the actor command list. Merge them; now the only difference between playing and broadcasting a command is that playing plays recursively on a tree and broadcasting sends to all subscribers. The distinction between "messages" and "commands" is cosmetic now; everything is a message. The only thing special about commands intended to be received as a broadcast is the "Message" suffix, which subscribes it.
This commit is contained in:
@@ -746,12 +746,9 @@ void NoteDisplay::DrawTap( const TapNote& tn, int iCol, float fBeat, bool bOnSam
|
||||
|
||||
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 );
|
||||
Message msg( "SetAttack" );
|
||||
msg.SetParam( "Modifiers", tn.sAttackModifiers );
|
||||
pActor->HandleMessage( msg );
|
||||
}
|
||||
|
||||
const float fYOffset = ArrowEffects::GetYOffset( m_pPlayerState, iCol, fBeat );
|
||||
|
||||
Reference in New Issue
Block a user