コード例 #1
0
void CHeavyMountedWeapon::SetUnMountedConfiguration()
{
	SwitchToRippedOffFireMode();

	IFireMode * pMountedFireMode = GetFireMode(0);
	assert(pMountedFireMode);
	
	pMountedFireMode->Enable(false);

	ExitZoom(true);

	//Second zoom mode is supposed to be unmounted
	if(GetZoomMode(1))
	{
		EnableZoomMode(1, true);
		SetCurrentZoomMode(1);
	}

	//Just in case, it was not clear properly
	CActor* pOwner = GetOwnerActor();
	if ((pOwner != NULL) && pOwner->IsClient())
	{
		float defaultFov = 55.0f;
		gEnv->pRenderer->EF_Query(EFQ_SetDrawNearFov,defaultFov);
	}
}
コード例 #2
0
ファイル: JAW.cpp プロジェクト: amrhead/eaascode
bool CJaw::CanAutoDrop()
{
	if (m_autoDropPendingTimer < g_autoDropDelayTime)
		return false;

	IZoomMode* pZoomMode = GetZoomMode(GetCurrentZoomMode());
	if (!pZoomMode)
		return true;
	return !(pZoomMode->IsZoomed() || pZoomMode->IsZoomingInOrOut());
}