From 54545e23493536a0c18cc2c23d379c82262cedb8 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Tue, 20 Jan 2004 03:31:08 +0000 Subject: [PATCH] pass "playcommand" on to children --- stepmania/src/ActorFrame.cpp | 13 +++++++++++++ stepmania/src/ActorFrame.h | 1 + 2 files changed, 14 insertions(+) diff --git a/stepmania/src/ActorFrame.cpp b/stepmania/src/ActorFrame.cpp index b9c5ebc435..543184ecdc 100644 --- a/stepmania/src/ActorFrame.cpp +++ b/stepmania/src/ActorFrame.cpp @@ -136,3 +136,16 @@ void ActorFrame::DeleteAllChildren() m_SubActors.clear(); } +void ActorFrame::HandleCommand( const ParsedCommand &command ) +{ + // pass "PlayCommand" on to children + if( command.vTokens[0].s=="playcommand" ) + { + for( unsigned i=0; iHandleCommand( command ); + return; // handled + } + + // base class handles the rest... + Actor::HandleCommand( command ); +} diff --git a/stepmania/src/ActorFrame.h b/stepmania/src/ActorFrame.h index ada4b57201..25e2ce8e1c 100644 --- a/stepmania/src/ActorFrame.h +++ b/stepmania/src/ActorFrame.h @@ -26,6 +26,7 @@ public: void DeleteAllChildren(); virtual void RunCommandOnChildren( const CString &cmd ); /* but not on self */ + virtual void HandleCommand( const ParsedCommand &command ); // derivable virtual void Update( float fDeltaTime ); virtual void DrawPrimitives();