Пример #1
0
void CHeavyMountedWeapon::Use(EntityId userId)
{
	int frameID = gEnv->pRenderer->GetFrameID();
	if (m_lastUsedFrame == frameID)
		return;

	m_lastUsedFrame = frameID;

	if (!m_owner.GetId())
	{
		StartUse(userId);
		HighlightWeapon(false);
	}
	else if (m_owner.GetId() == userId)
	{
		if (m_rippedOff || m_rippingOff)
		{
			FinishRipOff();
			DeselectAndDrop(userId);
		}
		else
		{
			StopUse(userId);
		}
	}
}
Пример #2
0
IMPLEMENT_RMI(CHeavyWeapon, ClDeselectAndDrop)
{
    DeselectAndDrop(params.ownerId);

    return true;
}