r2mods/ilspy_dump/ror2_csproj/RoR2.GamepadVibration/VibrationContext.cs

20 lines
455 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
namespace RoR2.GamepadVibration;
public struct VibrationContext
{
public CameraRigController cameraRigController;
public LocalUser localUser;
public float userVibrationScale;
public float CalcCamDisplacementMagnitude()
{
if (!cameraRigController || !Run.instance || !Run.instance.isRunning || localUser.cachedMasterController.master.lostBodyToDeath)
{
return 0f;
}
return cameraRigController.rawScreenShakeDisplacement.magnitude;
}
}