예제 #1
0
void CCinematicInput::OnAction( const EntityId actorId, const ActionId& actionId, int activationMode, float value)
{
	const CGameActions& gameActions = g_pGame->Actions();

	if (actionId == gameActions.attack1_cine)
	{
		CWeapon* pPrimaryWeapon = GetWeapon( eWeapon_Primary );
		if (pPrimaryWeapon != NULL)
		{
			pPrimaryWeapon->OnAction( actorId, actionId, activationMode, value );
		}
	}
	else if (actionId == gameActions.attack2_cine)
	{
		CWeapon* pSecondaryWeapon = GetWeapon( eWeapon_Secondary );
		if (pSecondaryWeapon != NULL)
		{
			pSecondaryWeapon->OnAction( actorId, actionId, activationMode, value );
		}
	}
}
예제 #2
0
void CCinematicInput::OnAction( const EntityId actorId, const ActionId& actionId, int activationMode, float value)
{
	const CGameActions& gameActions = g_pGame->Actions();

	if (actionId == gameActions.attack1_cine)
	{
		CWeapon* pPrimaryWeapon = GetWeapon( eWeapon_Primary );
		if (pPrimaryWeapon != NULL)
		{
			pPrimaryWeapon->OnAction( actorId, actionId, activationMode, value );
		}
	}
	else if (actionId == gameActions.attack2_cine)
	{
		CWeapon* pSecondaryWeapon = GetWeapon( eWeapon_Secondary );
		if (pSecondaryWeapon != NULL)
		{
			pSecondaryWeapon->OnAction( actorId, actionId, activationMode, value );
		}
	}
	else if (actionId == gameActions.skip_cutscene)
	{
		const int playingSequences = gEnv->pMovieSystem->GetNumPlayingSequences();
		for (int i = 0; i < playingSequences; ++i)
		{
			IAnimSequence* pSeq = gEnv->pMovieSystem->GetPlayingSequence(i);
			if (pSeq && pSeq->GetFlags() & IAnimSequence::eSeqFlags_CutScene)
			{
				if (!(pSeq->GetFlags() & IAnimSequence::eSeqFlags_NoAbort))
				{
					gEnv->pMovieSystem->SetPlayingTime(pSeq, pSeq->GetTimeRange().end);
				}
			}
		}
	}
}
예제 #3
0
void CTerraPlayerInput::OnActionAttack1(const ActionId& action, int activationMode, float value)
{
	CWeapon* pWeapon = m_pPlayer->GetWeapon(m_pPlayer->GetCurrentItemId());
	pWeapon->OnAction(m_pPlayer->GetEntityId(), action, activationMode, value);
}