static bool Prefix(float dt, Game __instance) { if (__instance.m_requestRespawn && __instance.FindSpawnPoint(out var point, out var usedLogoutPoint, dt)) { __instance.SpawnPlayer(point); __instance.m_requestRespawn = false; //Reset the status so this will work again if need be Game_FindSpawnPoint_Patch.Reset(); if (__instance.m_firstSpawn) { __instance.m_firstSpawn = false; Chat.instance.SendText(Talker.Type.Shout, "I have arrived!"); } GC.Collect(); } return(false); }
static bool Prefix() { // reset this on a new game (just in case) Game_FindSpawnPoint_Patch.Reset(); return(true); }