Merge branch 'dev' into eote-dreamworld-entry-exit

This commit is contained in:
Mister_Nebula 2022-03-28 21:05:03 +01:00
commit 6770b44d0f
3 changed files with 54 additions and 2 deletions

View File

@ -186,7 +186,7 @@ public class DeathPatches : QSBPatch
return;
}
if (!Custom(deathType))
if (!Custom(@this, deathType))
{
return;
}
@ -230,7 +230,7 @@ public class DeathPatches : QSBPatch
}
}
static bool Custom(DeathType deathType)
static bool Custom(DeathManager @this, DeathType deathType)
{
if (RespawnOnDeath.Instance == null)
{
@ -242,6 +242,11 @@ public class DeathPatches : QSBPatch
return true;
}
if (@this.CheckShouldWakeInDreamWorld())
{
return true;
}
if (QSBPlayerManager.LocalPlayer.IsDead)
{
return false;

View File

@ -40,6 +40,51 @@ public partial class PlayerInfo
AnimationSync = transformSync.GetComponent<AnimationSync>();
}
/// <summary>
/// called on player transform sync uninit.
/// (BOTH local and non-local)
/// </summary>
public void Reset()
{
HudMarker = default;
EyeState = default;
IsDead = default;
IsReady = default;
IsInMoon = default;
IsInShrine = default;
IsInEyeShuttle = default;
EntangledObject = default;
AudioController = default;
ThrusterLightTracker = default;
JetpackAcceleration = default;
_ditheringAnimator = default;
_camera = default;
CameraBody = default;
_body = default;
CurrentCharacterDialogueTreeId = -1;
CurrentDialogueBox = default;
InDreamWorld = default;
AssignedSimulationLantern = default;
ProbeBody = default;
Probe = default;
_handPivot = default;
Marshmallow = default;
Campfire = default;
HeldItem = default;
FlashlightActive = default;
SuitedUp = default;
ProbeLauncherEquipped = default;
SignalscopeEquipped = default;
TranslatorEquipped = default;
ProbeActive = default;
RoastingStick = default;
}
public void UpdateObjectsFromStates()
{
if (OWInput.GetInputMode() == InputMode.None)

View File

@ -63,6 +63,8 @@ public class PlayerTransformSync : SectoredTransformSync
Player.IsReady = false;
new PlayerReadyMessage(false).Send();
}
Player.Reset();
}
protected override void Init()