Veilheim/Map/PortalsOnMap.cs
/// <summary>
///     CLIENT SIDE: Initially pull portals after SetMapData on Minimap
/// </summary>
CLIENT SIDE: Initially pull portals after SetMapData on Minimap
CLIENT SIDE : Initially pull portals after SetMapData on Minimap
private static void UpdatePortalPins(On.Minimap.orig_SetMapData orig, Minimap self, byte[] data)
        {
            orig(self, data);
            if (ZNet.instance.IsServerInstance())
            {
                return;
            }
            if (!ConfigUtil.Get<bool>("Map", "showPortalsOnMap"))
            {
                return;
            }
            if (ZNet.instance.IsLocalInstance())
            {
                Logger.LogMessage("Initializing portals");
                UpdatePins(PortalList.GetPortals());
            }
            if (ZNet.instance.IsClientInstance())
            {
                Logger.LogMessage("Sending portal sync request to server");
                ZRoutedRpc.instance.InvokeRoutedRPC(ZRoutedRpc.instance.GetServerPeerID(), nameof(RPC_Veilheim_TeleporterSyncInit), new ZPackage());
            }
        }
private static void UpdatePortalPins ( On . Minimap . orig_SetMapData orig , Minimap self , byte [ ] data ) { orig ( self , data ) ; if ( ZNet . instance . IsServerInstance ( ) ) { return ; } if ( ! ConfigUtil . Get < bool > ( " " , " " ) ) { return ; } if ( ZNet . instance . IsLocalInstance ( ) ) { Logger . LogMessage ( " " ) ; UpdatePins ( PortalList . GetPortals ( ) ) ; } if ( ZNet . instance . IsClientInstance ( ) ) { Logger . LogMessage ( " " ) ; ZRoutedRpc . instance . InvokeRoutedRPC ( ZRoutedRpc . instance . GetServerPeerID ( ) , nameof ( RPC_Veilheim_TeleporterSyncInit ) , new ZPackage ( ) ) ; } }
CLIENT SIDE: Initially pull portals after SetMapData on Minimap
CLIENT SIDE : Initially pull portals after SetMapData on Minimap
orig
On.Minimap.orig_SetMapData
self
Minimap
data
byte[]