bool CHeavyMountedWeapon::AllowInteraction( EntityId interactionEntity, EInteractionType interactionType ) { if(interactionType==eInteraction_GameRulesPickup && (IsRippingOff()||!IsRippedOff())) { return false; } return BaseClass::AllowInteraction(interactionEntity, interactionType); }
//------------------------------------------------------------------------ bool CVehicleMountedWeapon::CanZoom() const { if (!CHeavyMountedWeapon::CanZoom()) return false; IVehicle *pVehicle = gEnv->pGame->GetIGameFramework()->GetIVehicleSystem()->GetVehicle(m_vehicleId); if(pVehicle && !IsRippedOff()) { if (m_pSeatUser != m_pOwnerSeat) return false; IActor* pActor = GetOwnerActor(); IVehicleSeat* pSeat = pActor ? pVehicle->GetSeatForPassenger(pActor->GetEntityId()) : NULL; IVehicleView* pView = pSeat ? pSeat->GetCurrentView() : NULL; if (pView && pView->IsThirdPerson()) return false; } return true; }