mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-17 01:13:05 +00:00
allow enter moon if someone else is inside it
This commit is contained in:
parent
4ce0c844a1
commit
b4741c6f1b
@ -30,14 +30,16 @@ internal class QuantumMoonPatches : QSBPatch
|
||||
{
|
||||
var playersWhoCanSeeMoon = QuantumManager.IsVisibleUsingCameraFrustum((ShapeVisibilityTracker)__instance._visibilityTracker, true).PlayersWhoCanSee;
|
||||
var shipInFog = GetShipInFog(__instance);
|
||||
var anyoneInMoon = QSBPlayerManager.PlayerList.Any(x => x.IsInMoon && !x.IsLocalPlayer);
|
||||
|
||||
DebugLog.DebugWrite($"Inside Fog - shipInFog:{shipInFog} playersWhoCanSeeMoon.Count:{playersWhoCanSeeMoon.Count}, lockedByProbeSnapshot:{__instance.IsLockedByProbeSnapshot()}");
|
||||
|
||||
if (playersWhoCanSeeMoon.Any(x => !(shipInFog && x.IsInShip) && !GetTransformInFog(__instance, x.CameraBody.transform)) || __instance.IsLockedByProbeSnapshot())
|
||||
// this probably breaks in really obscure cases, but it should be good enough...
|
||||
if (playersWhoCanSeeMoon.Any(x => !(shipInFog && x.IsInShip) && !GetTransformInFog(__instance, x.CameraBody.transform)) || __instance.IsLockedByProbeSnapshot() || anyoneInMoon)
|
||||
{
|
||||
/* Either :
|
||||
* - The moon is locked with a snapshot
|
||||
* OR
|
||||
* - Someone else is in the moon
|
||||
* OR
|
||||
* - If the ship is in the fog :
|
||||
* - there are people outside the ship who can see the moon, and who are not in the fog
|
||||
* - If the ship is not in the fog
|
||||
|
Loading…
Reference in New Issue
Block a user