Update 2.1.0
This commit is contained in:
parent
9fe689ef13
commit
7edad7d276
@ -32,23 +32,21 @@ namespace ScopeTweaks
|
|||||||
"General",
|
"General",
|
||||||
"Main camera scale %",
|
"Main camera scale %",
|
||||||
80,
|
80,
|
||||||
new ConfigDescription("Main camera resolution scale", new AcceptableValueRange<int>(25, 100)));
|
new ConfigDescription("Additional override applied on top of currently enabled resolution scaling method.", new AcceptableValueRange<int>(25, 100)));
|
||||||
|
|
||||||
scopeCameraResolutionScale = Config.Bind(
|
scopeCameraResolutionScale = Config.Bind(
|
||||||
"General",
|
"General",
|
||||||
"Scope camera scale %",
|
"Scope camera scale %",
|
||||||
80,
|
80,
|
||||||
new ConfigDescription("Scope camera resolution scale", new AcceptableValueRange<int>(25, 100)));
|
new ConfigDescription("Additional override applied on top of currently enabled resolution scaling method.", new AcceptableValueRange<int>(25, (int)(100f / currentScalingFactor))));
|
||||||
|
|
||||||
scopeFixType = Config.Bind("General", "High FOV sight tweak", EFOVScalingMode.ScopesOnly, new ConfigDescription(""));
|
scopeFixType = Config.Bind("General", "High FOV sight tweak", EFOVScalingMode.ScopesOnly, new ConfigDescription(""));
|
||||||
}
|
}
|
||||||
|
|
||||||
Camera FPSCamera = null;
|
|
||||||
Camera scopeCamera = null;
|
|
||||||
|
|
||||||
SSAA ssaaInstance = null;
|
|
||||||
FieldInfo _nextSSRation = null;
|
|
||||||
WaitForSeconds myDelaySec = new WaitForSeconds(1);
|
|
||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
@ -125,6 +123,13 @@ namespace ScopeTweaks
|
|||||||
/// CAMERA SETUP
|
/// CAMERA SETUP
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
|
Camera FPSCamera = null;
|
||||||
|
Camera scopeCamera = null;
|
||||||
|
|
||||||
|
SSAA ssaaInstance = null;
|
||||||
|
FieldInfo _nextSSRation = null;
|
||||||
|
|
||||||
|
WaitForSeconds myDelaySec = new WaitForSeconds(1);
|
||||||
IEnumerator tryGetMainCamera()
|
IEnumerator tryGetMainCamera()
|
||||||
{
|
{
|
||||||
string cameraName = "FPS Camera";
|
string cameraName = "FPS Camera";
|
||||||
@ -191,18 +196,17 @@ namespace ScopeTweaks
|
|||||||
|
|
||||||
void subscribeOnAimingChangedEvent()
|
void subscribeOnAimingChangedEvent()
|
||||||
{
|
{
|
||||||
|
|
||||||
Logger.LogInfo("Subscribing to OnAimingChanged Event");
|
Logger.LogInfo("Subscribing to OnAimingChanged Event");
|
||||||
mainPlayer.HandsController.OnAimingChanged += (aimingArgs) =>
|
mainPlayer.HandsController.OnAimingChanged += (aimingArgs) =>
|
||||||
{
|
{
|
||||||
currentScalingFactor = getCurrentScalingFactor();
|
currentScalingFactor = getCurrentScalingFactor();
|
||||||
StartCoroutine(tryGetScopeCamera());
|
StartCoroutine(tryGetScopeCamera());
|
||||||
|
|
||||||
|
|
||||||
Logger.LogInfo("AimingChanged: notAiming");
|
Logger.LogInfo("AimingChanged: notAiming");
|
||||||
if (!mainPlayer.ProceduralWeaponAnimation.IsAiming)
|
if (!mainPlayer.ProceduralWeaponAnimation.IsAiming)
|
||||||
{
|
{
|
||||||
|
switch(scopeFixType.Value)
|
||||||
switch(scopeFixType.Value)
|
|
||||||
{
|
{
|
||||||
case EFOVScalingMode.Disabled:
|
case EFOVScalingMode.Disabled:
|
||||||
{
|
{
|
||||||
@ -212,14 +216,14 @@ namespace ScopeTweaks
|
|||||||
case EFOVScalingMode.ScopesOnly:
|
case EFOVScalingMode.ScopesOnly:
|
||||||
{
|
{
|
||||||
setMainCameraResolutionScale();
|
setMainCameraResolutionScale();
|
||||||
GClass1774.Instance.SetFov(90, 0.33f, false);
|
GClass1774.Instance.SetFov(inGameFOV, 0.33f, false);
|
||||||
setInGameFOV(inGameFOV);
|
setInGameFOV(inGameFOV);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EFOVScalingMode.All:
|
case EFOVScalingMode.All:
|
||||||
{
|
{
|
||||||
setMainCameraResolutionScale();
|
setMainCameraResolutionScale();
|
||||||
GClass1774.Instance.SetFov(90, 0.33f, false);
|
GClass1774.Instance.SetFov(inGameFOV, 0.33f, false);
|
||||||
setInGameFOV(inGameFOV);
|
setInGameFOV(inGameFOV);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -272,7 +276,7 @@ namespace ScopeTweaks
|
|||||||
/// IN-GAME SETTINGS
|
/// IN-GAME SETTINGS
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
float currentScalingFactor;
|
float currentScalingFactor = 1.0f;
|
||||||
|
|
||||||
float getCurrentScalingFactor()
|
float getCurrentScalingFactor()
|
||||||
{
|
{
|
||||||
|
@ -31,6 +31,9 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="Aki.Reflection">
|
||||||
|
<HintPath>E:\SPT-AKI\SPT-AKI 3.2.3\EscapeFromTarkov_Data\Managed\Aki.Reflection.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>E:\SPT-AKI\SPT-AKI 3.2.3\EscapeFromTarkov_Data\Managed\Assembly-CSharp.dll</HintPath>
|
<HintPath>E:\SPT-AKI\SPT-AKI 3.2.3\EscapeFromTarkov_Data\Managed\Assembly-CSharp.dll</HintPath>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user