Something broke with ForcewipeFixed

We've tested this extensively and it has something to do with being around someone ahead of time.

Sometimes players can see you in vanish and sometimes they cannot.

It has something to do with being around them previously or not.  Can't quite get a grasp on what exactly yet we are still experimenting.  But 100% players can see you in vanish most of the time.  Every now and then it does work so it is very situational.  All started with force wipe today.

I can confirm. Banned mistakingly already a player where I was thinking they are using some sort of radar. Turned out they can see you when you teleport to them and the renederd admin playermodel doesn't move. Only works first time when teleporting to a player.

Steps to reproduce:

  1. Login on server with vanish and active players.
  2. Enable vanish
  3. Teleport to any player that is out of reach
  4. Look from players perspective around

Player perspective:

Player perspective

Ok so in my case, we could replicate it via the Player Administration plugin menu. 

If you went VANISH then use the player administration menu to teleport to the player, you would show up to the player after teleporting. 
(https://umod.org/plugins/player-administration)

Just using the console command seemed to not put you out of vanish. 

Can confirm as well. Its when you teleport to a player they can see you

[Vanish] Failed to automatically Harmony patch 'BasePlayer_OcclusionPlayerFound_Patch' (Exception: Parameter "cache" not found in method static System.Void BasePlayer::OcclusionPlayerFound(BasePlayer player1, BasePlayer player2, System.Single networkTime, System.Boolean ordered))
at HarmonyLib.MethodPatcher.EmitCallParameter (System.Reflection.MethodInfo patch, System.Collections.Generic.Dictionary`2[TKey,TValue] variables, System.Reflection.Emit.LocalBuilder runOriginalVariable, System.Boolean allowFirsParamPassthrough, System.Reflection.Emit.LocalBuilder& tmpInstanceBoxingVar, System.Reflection.Emit.LocalBuilder& tmpObjectVar, System.Boolean& refResultUsed, System.Collections.Generic.List`1[T] tmpBoxVars) [0x00ada] in <6c906b4f1de440f3a86cb0ebb3f48ea6>:0
at HarmonyLib.MethodPatcher+<>c__DisplayClass35_0.<AddPrefixes>b__0 (System.Reflection.MethodInfo fix) [0x00070] in <6c906b4f1de440f3a86cb0ebb3f48ea6>:0
at HarmonyLib.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable`1[T] sequence, System.Action`1[T] action) [0x00014] in <6c906b4f1de440f3a86cb0ebb3f48ea6>:0
at HarmonyLib.MethodPatcher.AddPrefixes (System.Collections.Generic.Dictionary`2[TKey,TValue] variables, System.Reflection.Emit.LocalBuilder runOriginalVariable) [0x0001b] in <6c906b4f1de440f3a86cb0ebb3f48ea6>:0
at HarmonyLib.MethodPatcher.CreateReplacement (System.Collections.Generic.Dictionary`2[System.Int32,HarmonyLib.CodeInstruction]& finalInstructions) [0x0029e] in <6c906b4f1de440f3a86cb0ebb3f48ea6>:0
at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00059] in <6c906b4f1de440f3a86cb0ebb3f48ea6>:0
at HarmonyLib.PatchClassProcessor.ProcessPatchJob (HarmonyLib.PatchJobs`1+Job[T] job) [0x000be] in <6c906b4f1de440f3a86cb0ebb3f48ea6>:0
[Vanish] Load Data

Same with teleport

Looks like the Naval added or changed visibility + networking recalculation during teleport. This is what I've done in order to resolve it, until Whisper comes out with an updated version. But this seems to have resolved it for me ... 

Replace lines 160 to 192 with the following;

        private void InitVanishedPlayers()
        {
            foreach (BasePlayer player in BasePlayer.activePlayerList)
            {
                if (IsHidden(player) && !_hiddenPlayers.Contains(player))
                {
                    if (!player.IsConnected)
                    {
                        List<Connection> connections = Pool.Get<List<Connection>>();
                        foreach (var con in Net.sv.connections)
                        {
                            if (con.connected && con.isAuthenticated && con.player is BasePlayer && con.player != player)
                                connections.Add(con);
                        }
                        player.OnNetworkSubscribersLeave(connections);
                        player.DisablePlayerCollider();
                        player.syncPosition = false;
                        player.limitNetworking = true;
                        Pool.FreeUnmanaged(ref connections);
                    }
                    else
                    {
                        Disappear(player);
                    }
                }
            }
        }

        private void EnforceHiddenState(BasePlayer player)
        {
            if (player == null || !_hiddenPlayers.Contains(player))
                return;

            if (!player.IsConnected)
                return;

            List<Connection> connections = Pool.Get<List<Connection>>();
            foreach (var con in Net.sv.connections)
            {
                if (con.connected && con.isAuthenticated && con.player is BasePlayer && con.player != player)
                    connections.Add(con);
            }

            player.OnNetworkSubscribersLeave(connections);
            player.DisablePlayerCollider();
            player.syncPosition = false;
            player.limitNetworking = true;
            Pool.FreeUnmanaged(ref connections);
        }
        #endregion Configuration
        #region Localization


Then replace lines 1118 to 1136 with;

 //for shotgun traps & to keep vanished players hidden after teleports
        [HarmonyPatch(typeof(BasePlayer), "Teleport", typeof(Vector3)), AutoPatch]
        private static class BasePlayer_Teleport_Patch
        {
            [HarmonyPostfix]
            private static void Postfix(BasePlayer __instance)
            {
                if (__instance == null || vanish == null)
                    return;

                // Only care about players that are currently considered vanished by this plugin
                if (!_hiddenPlayers.Contains(__instance))
                    return;

                // Re-enforce the hidden state after any teleport.
                vanish.EnforceHiddenState(__instance);
            }
        }
        #endregion Harmony
    }
}

 

update is out

TjTsrtDe5ANx1SV.jpg Whispers88

update is out

You da man, thanks!

Locked automatically