-
-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from LunaMultiplayer/master
Syncing
- Loading branch information
Showing
33 changed files
with
400 additions
and
534 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using Harmony; | ||
using LunaClient.Systems.Lock; | ||
using LunaClient.Systems.SettingsSys; | ||
using LunaCommon.Enums; | ||
using UnityEngine; | ||
// ReSharper disable All | ||
|
||
namespace LunaClient.Harmony | ||
{ | ||
/// <summary> | ||
/// This harmony patch is intended to avoid part explosions on other ppl vessels | ||
/// </summary> | ||
[HarmonyPatch(typeof(Part))] | ||
[HarmonyPatch("HandleCollision")] | ||
public class Part_HandleCollision | ||
{ | ||
[HarmonyPrefix] | ||
private static bool PrefixHandleCollision(Part __instance, Collision c) | ||
{ | ||
if (MainSystem.NetworkState < ClientState.Connected) return true; | ||
|
||
if (__instance?.vessel != null) | ||
{ | ||
return LockSystem.LockQuery.UpdateLockBelongsToPlayer(__instance.vessel.id, SettingsSystem.CurrentSettings.PlayerName); | ||
} | ||
|
||
return true; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Harmony; | ||
using LunaClient.Systems.Lock; | ||
using LunaClient.Systems.SettingsSys; | ||
using LunaCommon.Enums; | ||
// ReSharper disable All | ||
|
||
namespace LunaClient.Harmony | ||
{ | ||
/// <summary> | ||
/// This harmony patch is intended to avoid run the kill checks in vessels that are not yours | ||
/// </summary> | ||
[HarmonyPatch(typeof(Vessel))] | ||
[HarmonyPatch("CheckKill")] | ||
public class Vessel_CheckKill | ||
{ | ||
[HarmonyPrefix] | ||
private static bool PrefixCheckKill(Vessel __instance) | ||
{ | ||
if (MainSystem.NetworkState < ClientState.Connected) return true; | ||
|
||
return LockSystem.LockQuery.UnloadedUpdateLockBelongsToPlayer(__instance.id, SettingsSystem.CurrentSettings.PlayerName); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
198 changes: 0 additions & 198 deletions
198
Client/Systems/VesselPositionSys/MessageToPositionTransfer.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.