Added MuteActions preference checking to RageSound::PlayCopy. Modified ActorSound and GameSoundManager::PlayOnce to take is_action args. Fixed doc for playcommand to mention the param table.

This commit is contained in:
Kyzentun
2015-04-08 16:15:14 -06:00
parent 84b57e7ca4
commit 8993cfe729
16 changed files with 58 additions and 18 deletions
+9 -1
View File
@@ -14,7 +14,7 @@ void ActorSound::Load( const RString &sPath )
void ActorSound::Play()
{
m_Sound.Play(false);
m_Sound.Play(m_is_action);
}
void ActorSound::Pause( bool bPause )
@@ -32,6 +32,7 @@ void ActorSound::LoadFromNode( const XNode* pNode )
RageSoundLoadParams params;
pNode->GetAttrValue("SupportPan", params.m_bSupportPan);
pNode->GetAttrValue("SupportRateChanging", params.m_bSupportRateChanging);
pNode->GetAttrValue("IsAction", m_is_action);
bool bPrecache = true;
pNode->GetAttrValue( "Precache", bPrecache );
@@ -55,6 +56,12 @@ public:
static int pause( T* p, lua_State *L ) { p->Pause(BArg(1)); COMMON_RETURN_SELF; }
static int stop( T* p, lua_State *L ) { p->Stop(); COMMON_RETURN_SELF; }
static int get( T* p, lua_State *L ) { p->PushSound( L ); return 1; }
static int set_is_action(T* p, lua_State* L)
{
p->m_is_action= BArg(1);
COMMON_RETURN_SELF;
}
DEFINE_METHOD(get_is_action, m_is_action);
LunaActorSound()
{
@@ -63,6 +70,7 @@ public:
ADD_METHOD( pause );
ADD_METHOD( stop );
ADD_METHOD( get );
ADD_GET_SET_METHODS(is_action);
}
};