Merge pull request #570 from misternebula/patch-13

Patch 13
This commit is contained in:
_nebula 2022-09-22 10:22:02 +01:00 committed by GitHub
commit db490093ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 46 additions and 30 deletions

View File

@ -3,7 +3,7 @@
<RootNamespace>EpicTransport</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="OuterWildsGameLibs" Version="1.1.13.393" IncludeAssets="compile" />
<Reference Include="../Mirror/*.dll" />
<PackageReference Include="OuterWildsGameLibs" Version="1.1.12.201" IncludeAssets="compile" />
</ItemGroup>
</Project>

View File

@ -3,7 +3,7 @@
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="OuterWildsGameLibs" Version="1.1.12.201" IncludeAssets="compile" />
<PackageReference Include="HarmonyX" Version="2.10.0" IncludeAssets="compile" />
<PackageReference Include="OuterWildsGameLibs" Version="1.1.13.393" IncludeAssets="compile" />
<PackageReference Include="OWML" Version="2.7.0" IncludeAssets="compile" />
</ItemGroup>
</Project>

View File

@ -3,9 +3,8 @@
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="OuterWildsGameLibs" Version="1.1.12.201" />
<PackageReference Include="OWML" Version="2.6.0" />
<PackageReference Include="HarmonyX" Version="2.10.0" />
<PackageReference Include="OuterWildsGameLibs" Version="1.1.13.393" />
<PackageReference Include="OWML" Version="2.7.0" />
<Reference Include="../Mirror/*.dll" />
</ItemGroup>
</Project>

View File

@ -56,7 +56,11 @@ public class QSBIdentifyIntruderAction : QSBGhostAction
return -100f;
}
if (_running || (_data.interestedPlayer.sensor.isPlayerHeldLanternVisible && (_data.threatAwareness > GhostData.ThreatAwareness.EverythingIsNormal || _data.interestedPlayer.playerLocation.distance < 20f)) || _data.interestedPlayer.sensor.isIlluminatedByPlayer)
if (_running
|| (_data.interestedPlayer.sensor.isPlayerHeldLanternVisible
&& (_data.threatAwareness > GhostData.ThreatAwareness.EverythingIsNormal || _data.interestedPlayer.playerLocation.distance < 20f)
&& _controller.AttachedObject.GetNodeMap().CheckLocalPointInBounds(_data.interestedPlayer.playerLocation.localPosition))
|| _data.interestedPlayer.sensor.isIlluminatedByPlayer)
{
return 80f;
}

View File

@ -37,8 +37,7 @@ public class QSBStalkAction : QSBGhostAction
{
var flag = _data.interestedPlayer.player.AssignedSimulationLantern.AttachedObject.GetLanternController().IsConcealed();
_wasPlayerLanternConcealed = flag;
_isFocusingLight = flag;
_shouldFocusLightOnPlayer = flag;
_isFocusingLight = _shouldFocusLightOnPlayer = flag || !_data.interestedPlayer.sensor.isPlayerHoldingLantern;
_changeFocusTime = 0f;
_controller.ChangeLanternFocus(_isFocusingLight ? 1f : 0f, 2f);
_controller.SetLanternConcealed(!_isFocusingLight, true);
@ -80,15 +79,16 @@ public class QSBStalkAction : QSBGhostAction
&& _data.interestedPlayer.wasPlayerLocationKnown;
_wasPlayerLanternConcealed = isPlayerLanternConcealed;
if (sawPlayerLanternConceal && !_shouldFocusLightOnPlayer)
var flag3 = (!_data.interestedPlayer.sensor.isPlayerHoldingLantern && _data.interestedPlayer.wasPlayerLocationKnown) || _data.interestedPlayer.sensor.isPlayerDroppedLanternVisible;
if ((sawPlayerLanternConceal || flag3) && !_shouldFocusLightOnPlayer)
{
_shouldFocusLightOnPlayer = true;
_changeFocusTime = Time.time + 1f;
_changeFocusTime = Time.time + 0.5f;
}
else if (_data.interestedPlayer.sensor.isPlayerHeldLanternVisible && _shouldFocusLightOnPlayer)
{
_shouldFocusLightOnPlayer = false;
_changeFocusTime = Time.time + 1f;
_changeFocusTime = Time.time + 0.5f;
}
if (_isFocusingLight != _shouldFocusLightOnPlayer && Time.time > _changeFocusTime)

View File

@ -81,12 +81,15 @@ internal class GhostPartyPathDirectorPatches : QSBPatch
ghostBrain.AttachedObject.transform.eulerAngles = Vector3.up * __instance._ghostSpawns[Random.Range(0, __instance._ghostSpawns.Length)].spawnTransform.eulerAngles.y;
ghostBrain.TabulaRasa();
partyPathAction.ResetPath();
if (__instance._numEnabledGhostProxies < __instance._ghostFinalDestinations.Length && __instance._ghostFinalDestinations[__instance._numEnabledGhostProxies].proxyGhost != null)
if (!__instance._disableGhostProxies && __instance._numEnabledGhostProxies < __instance._ghostFinalDestinations.Length)
{
__instance._ghostFinalDestinations[__instance._numEnabledGhostProxies].proxyGhost.gameObject.SetActive(true);
if (__instance._ghostFinalDestinations[__instance._numEnabledGhostProxies].proxyGhost != null)
{
__instance._ghostFinalDestinations[__instance._numEnabledGhostProxies].proxyGhost.Reveal();
}
__instance._numEnabledGhostProxies++;
}
__instance._numEnabledGhostProxies++;
__instance._waitingGhosts.Add(ghostBrain.AttachedObject);
}
}

View File

@ -79,20 +79,30 @@ public class QSBGhostEffects : WorldObject<GhostEffects>, IGhostObject
var relativeVelocity = AttachedObject._controller.GetRelativeVelocity();
var num = (AttachedObject._movementStyle == GhostEffects.MovementStyle.Chase) ? 8f : 2f;
var targetValue = new Vector2(relativeVelocity.x / num, relativeVelocity.z / num);
float num2 = new Vector2(relativeVelocity.y, relativeVelocity.z).magnitude * Mathf.Sign(relativeVelocity.z);
Vector2 targetValue = new Vector2(relativeVelocity.x / num, num2 / num);
AttachedObject._smoothedMoveSpeed = AttachedObject._moveSpeedSpring.Update(AttachedObject._smoothedMoveSpeed, targetValue, Time.deltaTime);
AttachedObject._animator.SetFloat(GhostEffects.AnimatorKeys.Float_MoveDirectionX, AttachedObject._smoothedMoveSpeed.x);
AttachedObject._animator.SetFloat(GhostEffects.AnimatorKeys.Float_MoveDirectionY, AttachedObject._smoothedMoveSpeed.y);
float num3 = Vector3.SignedAngle(new Vector3(relativeVelocity.x, 0f, relativeVelocity.z), relativeVelocity, Vector3.left);
float targetValue2 = Mathf.Clamp(num3 / 30f, -1f, 1f);
if (num3 > 15f && AttachedObject._controller.IsApproachingEndOfIncline())
{
targetValue2 = 0f;
}
AttachedObject._smoothedMoveSlope = AttachedObject._moveSlopeSpring.Update(AttachedObject._smoothedMoveSlope, targetValue2, Time.deltaTime);
AttachedObject._animator.SetFloat(GhostEffects.AnimatorKeys.Float_MoveSlope, AttachedObject._smoothedMoveSlope);
AttachedObject._smoothedTurnSpeed = AttachedObject._turnSpeedSpring.Update(AttachedObject._smoothedTurnSpeed, AttachedObject._controller.GetAngularVelocity() / 90f, Time.deltaTime);
AttachedObject._animator.SetFloat(GhostEffects.AnimatorKeys.Float_TurnSpeed, AttachedObject._smoothedTurnSpeed);
var target = _data.isIlluminated ? 1f : 0f;
var num2 = _data.isIlluminated ? 8f : 0.8f;
AttachedObject._eyeGlow = Mathf.MoveTowards(AttachedObject._eyeGlow, target, Time.deltaTime * num2);
var num4 = _data.isIlluminated ? 8f : 0.8f;
AttachedObject._eyeGlow = Mathf.MoveTowards(AttachedObject._eyeGlow, target, Time.deltaTime * num4);
var closestPlayer = QSBPlayerManager.GetClosestPlayerToWorldPoint(AttachedObject.transform.position, true);
var num3 = (closestPlayer?.AssignedSimulationLantern?.AttachedObject?.GetLanternController()?.GetLight()?.GetFlickerScale() - 1f + 0.07f) / 0.14f ?? 0;
num3 = Mathf.Lerp(0.7f, 1f, num3);
var num5 = (closestPlayer?.AssignedSimulationLantern?.AttachedObject?.GetLanternController()?.GetLight()?.GetFlickerScale() - 1f + 0.07f) / 0.14f ?? 0;
num5 = Mathf.Lerp(0.7f, 1f, num5);
AttachedObject.SetEyeGlow(AttachedObject._eyeGlow * num3);
if (AttachedObject._playingDeathSequence)

View File

@ -46,8 +46,10 @@ public class QSBGhostSensors : WorldObject<GhostSensors>, IGhostObject
}
public bool CanGrabPlayer(GhostPlayer player)
=> !PlayerState.IsAttached()
=> !PlayerState.IsAttached() // TODO : check for each player
&& player.playerLocation.distanceXZ < 2f + AttachedObject._grabDistanceBuff
&& player.playerLocation.toPosition.y > -2f
&& player.playerLocation.toPosition.y < 3f
&& player.playerLocation.degreesToPositionXZ < 20f + AttachedObject._grabAngleBuff
&& AttachedObject._animator.GetFloat("GrabWindow") > 0.5f;

View File

@ -50,7 +50,6 @@
<_Files Include="$(OutputPath)\*.pdb" />
<_Files Include="$(GameDllsDir)\EOS-SDK.dll" />
<_Files Include="$(GameDllsDir)\UniSense.dll" />
<_Files Include="$(GameDllsDir)\Autofac.dll" />
<_Files Include="$(GameDllsDir)\Newtonsoft.Json.dll" />
<_Files Include="$(GameDllsDir)\0Harmony.dll" />
@ -77,9 +76,9 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Remove="Assets\*.pdn" />
<None Include="Translations\*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Translations\*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="AssetBundles\*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
@ -90,13 +89,12 @@
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="OuterWildsGameLibs" Version="1.1.12.201" IncludeAssets="compile" />
<PackageReference Include="OuterWildsGameLibs" Version="1.1.13.393" IncludeAssets="compile" />
<PackageReference Include="OWML" Version="2.7.0" IncludeAssets="compile" />
<Reference Include="..\Mirror\*.dll" />
<Reference Include="..\UniTask\*.dll" />
<ProjectReference Include="..\EpicOnlineTransport\EpicOnlineTransport.csproj" />
<ProjectReference Include="..\EpicRerouter\EpicRerouter.csproj" />
<ProjectReference Include="..\MirrorWeaver\MirrorWeaver.csproj" ReferenceOutputAssembly="false" />
<PackageReference Include="HarmonyX" Version="2.10.0" IncludeAssets="compile" />
<PackageReference Include="OWML" Version="2.6.0" IncludeAssets="compile" />
</ItemGroup>
</Project>

View File

@ -278,7 +278,7 @@ internal class QSBStandaloneProfileManager : IProfileManager
Debug.LogError("Could not find graphics settings for " + profile.profileName);
}
if (inputJSON == "")
if (string.IsNullOrEmpty(inputJSON))
{
profile.brokenRebindingData = File.Exists(inputsPath);
inputJSON = ((InputManager)OWInput.SharedInputManager).commandManager.DefaultInputActions.ToJson();

View File

@ -8,7 +8,7 @@
},
"uniqueName": "Raicuparta.QuantumSpaceBuddies",
"version": "0.22.0",
"owmlVersion": "2.6.0",
"owmlVersion": "2.7.0",
"dependencies": [ "_nebula.MenuFramework", "JohnCorby.VanillaFix" ],
"pathsToPreserve": [ "debugsettings.json", "storage.json" ]
}