mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-21 00:39:53 +00:00
add patch file
This commit is contained in:
parent
dc6232bbcf
commit
022636d588
@ -4,6 +4,7 @@ using QSB.DeathSync;
|
||||
using QSB.ElevatorSync;
|
||||
using QSB.LogSync;
|
||||
using QSB.OrbSync;
|
||||
using QSB.QuantumSync;
|
||||
using QSB.TimeSync;
|
||||
using QSB.Utility;
|
||||
using System;
|
||||
@ -29,7 +30,8 @@ namespace QSB.Patches
|
||||
new ElevatorPatches(),
|
||||
new OrbPatches(),
|
||||
new WakeUpPatches(),
|
||||
new LogPatches()
|
||||
new LogPatches(),
|
||||
new ServerQuantumPatches()
|
||||
};
|
||||
|
||||
DebugLog.DebugWrite("Patch Manager ready.", MessageType.Success);
|
||||
|
@ -4,6 +4,7 @@
|
||||
{
|
||||
OnModStart = 0,
|
||||
OnClientConnect = 1,
|
||||
OnNonServerClientConnect = 2
|
||||
OnNonServerClientConnect = 2,
|
||||
OnServerClientConnect = 3
|
||||
}
|
||||
}
|
@ -197,6 +197,7 @@
|
||||
<Compile Include="Patches\QSBPatch.cs" />
|
||||
<Compile Include="Patches\QSBPatchTypes.cs" />
|
||||
<Compile Include="QSBSceneManager.cs" />
|
||||
<Compile Include="QuantumSync\ServerQuantumPatches.cs" />
|
||||
<Compile Include="TimeSync\TimeSyncType.cs" />
|
||||
<Compile Include="TimeSync\TimeSyncUI.cs" />
|
||||
<Compile Include="TimeSync\WakeUpPatches.cs" />
|
||||
|
@ -176,11 +176,8 @@ namespace QSB
|
||||
OrbManager.Instance.QueueBuildSlots();
|
||||
}
|
||||
|
||||
if (!QSBNetworkServer.localClientActive)
|
||||
{
|
||||
QSBPatchManager.DoPatchType(QSBPatchTypes.OnNonServerClientConnect);
|
||||
}
|
||||
|
||||
var specificType = QSBNetworkServer.active ? QSBPatchTypes.OnServerClientConnect : QSBPatchTypes.OnNonServerClientConnect;
|
||||
QSBPatchManager.DoPatchType(specificType);
|
||||
QSBPatchManager.DoPatchType(QSBPatchTypes.OnClientConnect);
|
||||
|
||||
_lobby.CanEditName = false;
|
||||
|
27
QSB/QuantumSync/ServerQuantumPatches.cs
Normal file
27
QSB/QuantumSync/ServerQuantumPatches.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using QSB.Patches;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace QSB.QuantumSync
|
||||
{
|
||||
public class ServerQuantumPatches : QSBPatch
|
||||
{
|
||||
public override QSBPatchTypes Type => QSBPatchTypes.OnServerClientConnect;
|
||||
|
||||
public override void DoPatches()
|
||||
{
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<ShapeVisibilityTracker>("IsVisibleUsingCameraFrustum", typeof(ServerQuantumPatches), nameof(IsVisibleUsingCameraFrustrum));
|
||||
}
|
||||
|
||||
// ShapeVisibilityTracker patches
|
||||
|
||||
public bool IsVisibleUsingCameraFrustrum()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user