diff --git a/EpicOnlineTransport/EpicOnlineTransport.csproj b/EpicOnlineTransport/EpicOnlineTransport.csproj index 5655714a..a1563cdf 100644 --- a/EpicOnlineTransport/EpicOnlineTransport.csproj +++ b/EpicOnlineTransport/EpicOnlineTransport.csproj @@ -3,7 +3,7 @@ EpicTransport + - diff --git a/EpicRerouter/EpicRerouter.csproj b/EpicRerouter/EpicRerouter.csproj index dbebee21..3cff5ff9 100644 --- a/EpicRerouter/EpicRerouter.csproj +++ b/EpicRerouter/EpicRerouter.csproj @@ -3,7 +3,7 @@ Exe - - + + diff --git a/MirrorWeaver/MirrorWeaver.csproj b/MirrorWeaver/MirrorWeaver.csproj index 1c74801b..61a05999 100644 --- a/MirrorWeaver/MirrorWeaver.csproj +++ b/MirrorWeaver/MirrorWeaver.csproj @@ -3,9 +3,8 @@ Exe - - - + + diff --git a/QSB/EchoesOfTheEye/Ghosts/Actions/QSBIdentifyIntruderAction.cs b/QSB/EchoesOfTheEye/Ghosts/Actions/QSBIdentifyIntruderAction.cs index e79417cc..1934de9e 100644 --- a/QSB/EchoesOfTheEye/Ghosts/Actions/QSBIdentifyIntruderAction.cs +++ b/QSB/EchoesOfTheEye/Ghosts/Actions/QSBIdentifyIntruderAction.cs @@ -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; } diff --git a/QSB/EchoesOfTheEye/Ghosts/Actions/QSBStalkAction.cs b/QSB/EchoesOfTheEye/Ghosts/Actions/QSBStalkAction.cs index 2dd84346..9d9f1a45 100644 --- a/QSB/EchoesOfTheEye/Ghosts/Actions/QSBStalkAction.cs +++ b/QSB/EchoesOfTheEye/Ghosts/Actions/QSBStalkAction.cs @@ -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) diff --git a/QSB/EchoesOfTheEye/Ghosts/Patches/GhostPartyPathDirectorPatches.cs b/QSB/EchoesOfTheEye/Ghosts/Patches/GhostPartyPathDirectorPatches.cs index 9db6902a..68491445 100644 --- a/QSB/EchoesOfTheEye/Ghosts/Patches/GhostPartyPathDirectorPatches.cs +++ b/QSB/EchoesOfTheEye/Ghosts/Patches/GhostPartyPathDirectorPatches.cs @@ -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); } } diff --git a/QSB/EchoesOfTheEye/Ghosts/WorldObjects/QSBGhostEffects.cs b/QSB/EchoesOfTheEye/Ghosts/WorldObjects/QSBGhostEffects.cs index bb31271f..eeaf8769 100644 --- a/QSB/EchoesOfTheEye/Ghosts/WorldObjects/QSBGhostEffects.cs +++ b/QSB/EchoesOfTheEye/Ghosts/WorldObjects/QSBGhostEffects.cs @@ -79,20 +79,30 @@ public class QSBGhostEffects : WorldObject, 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) diff --git a/QSB/EchoesOfTheEye/Ghosts/WorldObjects/QSBGhostSensors.cs b/QSB/EchoesOfTheEye/Ghosts/WorldObjects/QSBGhostSensors.cs index af8b8d10..e38b0283 100644 --- a/QSB/EchoesOfTheEye/Ghosts/WorldObjects/QSBGhostSensors.cs +++ b/QSB/EchoesOfTheEye/Ghosts/WorldObjects/QSBGhostSensors.cs @@ -46,8 +46,10 @@ public class QSBGhostSensors : WorldObject, 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; diff --git a/QSB/QSB.csproj b/QSB/QSB.csproj index 46efb0af..f3bdfee4 100644 --- a/QSB/QSB.csproj +++ b/QSB/QSB.csproj @@ -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 @@ PreserveNewest - - PreserveNewest - + + PreserveNewest + PreserveNewest @@ -90,13 +89,12 @@ - + + - - diff --git a/QSB/SaveSync/QSBStandaloneProfileManager.cs b/QSB/SaveSync/QSBStandaloneProfileManager.cs index 06ef63f6..b78c5e9f 100644 --- a/QSB/SaveSync/QSBStandaloneProfileManager.cs +++ b/QSB/SaveSync/QSBStandaloneProfileManager.cs @@ -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(); diff --git a/QSB/manifest.json b/QSB/manifest.json index 5302e614..e0551f00 100644 --- a/QSB/manifest.json +++ b/QSB/manifest.json @@ -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" ] }