#AntiCheat
1 messages · Page 1 of 1 (latest)
and which one is used in the game?
using System.Collections.Generic;
using Mirror;
public class CustomInterestManagement : InterestManagement
{
public override bool OnCheckObserver(NetworkIdentity identity, NetworkConnectionToClient newObserver)
{
return true;
}
public override void OnRebuildObservers(NetworkIdentity identity, HashSet<NetworkConnectionToClient> newObservers)
{
if (identity.visible == Visibility.ForceHidden)
{
return;
}
foreach (NetworkConnectionToClient value in NetworkServer.connections.Values)
{
if (value.isReady)
{
newObservers.Add(value);
}
}
if (NetworkServer.localConnection != null && NetworkServer.localConnection.isReady)
{
newObservers.Add(NetworkServer.localConnection);
}
}
}
The game just uses this one
you need to patch it or just register your own
and make that everything else is visibile except if you are in distance of the Generators
So I did the right thing, thank you
but be careful
because some stuff NEEDS to be registered
and needs to always be added
it doesn't work, there aren't even any logs
you need to rebuild everytime
Because this is not a client thing
you need to add a code that sometimes make it rebuild
NOT ALWAYS
you will crash the client
When the room changes, for example
its complex to do that
but yea
if you already have a system in place why not
The question is, won't the players' network and FPS die?
i would say to you, to do something
DestroyNetworkIdentitiy
and spawn it
once in range
do a monobehavior that does that
its honestly easier
I tried, but the client was lagging.
if you do not know how to do it, it lags