mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-21 00:39:53 +00:00
Merge pull request #281 from misternebula/more-fixes
Fix quit issue and stop probe teleporting to player head for 1 frame
This commit is contained in:
commit
27bf37242f
@ -6,8 +6,17 @@ namespace QSB.Player.Patches
|
||||
{
|
||||
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
||||
|
||||
public override void DoPatches() => QSBCore.HarmonyHelper.AddPrefix<PlayerCrushedController>("CrushPlayer", typeof(PlayerPatches), nameof(PlayerCrushedController_CrushPlayer));
|
||||
public override void DoUnpatches() => QSBCore.HarmonyHelper.Unpatch<PlayerCrushedController>("CrushPlayer");
|
||||
public override void DoPatches()
|
||||
{
|
||||
QSBCore.HarmonyHelper.AddPrefix<PlayerCrushedController>("CrushPlayer", typeof(PlayerPatches), nameof(PlayerCrushedController_CrushPlayer));
|
||||
QSBCore.HarmonyHelper.AddPrefix<PauseMenuManager>("OnExitToMainMenu", typeof(PlayerPatches), nameof(PauseMenuManager_OnExitToMainMenu));
|
||||
}
|
||||
|
||||
public override void DoUnpatches()
|
||||
{
|
||||
QSBCore.HarmonyHelper.Unpatch<PlayerCrushedController>("CrushPlayer");
|
||||
QSBCore.HarmonyHelper.Unpatch<PauseMenuManager>("OnExitToMainMenu");
|
||||
}
|
||||
|
||||
public static bool PlayerCrushedController_CrushPlayer()
|
||||
{
|
||||
@ -16,5 +25,11 @@ namespace QSB.Player.Patches
|
||||
Locator.GetDeathManager().KillPlayer(DeathType.Crushed);
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void PauseMenuManager_OnExitToMainMenu()
|
||||
{
|
||||
QSBPlayerManager.LocalPlayer.PlayerStates.IsReady = false;
|
||||
QSBCore.HasWokenUp = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ namespace QSB.ProbeSync.TransformSync
|
||||
_disabledSocket = socket;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
protected override void UpdateTransform()
|
||||
{
|
||||
base.UpdateTransform();
|
||||
@ -85,6 +85,7 @@ namespace QSB.ProbeSync.TransformSync
|
||||
}
|
||||
SyncedTransform.localPosition = ReferenceSector.Transform.InverseTransformPoint(_disabledSocket.position);
|
||||
}
|
||||
*/
|
||||
|
||||
public override bool IsReady => Locator.GetProbe() != null
|
||||
&& Player != null
|
||||
|
Loading…
x
Reference in New Issue
Block a user