Added WalkInLobby function

This commit is contained in:
Jadis
2022-09-08 23:34:11 +03:00
committed by GitHub
parent 6fb812fce2
commit 59f290773f

View File

@@ -6,6 +6,7 @@ using System.Runtime.InteropServices;
using DevourClient.Helpers; using DevourClient.Helpers;
using System.Linq; using System.Linq;
using System.Collections.Generic; using System.Collections.Generic;
using Opsive.UltimateCharacterController.Character;
namespace DevourClient.Hacks namespace DevourClient.Hacks
{ {
@@ -43,6 +44,20 @@ namespace DevourClient.Hacks
nb.locomotion.SetPosition(pos, false); nb.locomotion.SetPosition(pos, false);
} }
public static void WalkInLobby(bool walk)
{
try {
if (Helpers.LocalPlayer.GetLocalPlayer().GetComponent<UltimateCharacterLocomotionHandler>() == null)
{
Helpers.LocalPlayer.GetLocalPlayer().AddComponent<UltimateCharacterLocomotionHandler>();
Helpers.LocalPlayer.GetLocalPlayer().GetComponent<UltimateCharacterLocomotionHandler>().enabled = false;
}
Helpers.LocalPlayer.GetLocalPlayer().GetComponent<UltimateCharacterLocomotionHandler>().enabled = walk;
}
catch { return; }
}
public static void BurnRitualObj(string map, bool burnAll) public static void BurnRitualObj(string map, bool burnAll)
{ {
SurvivalObjectBurnController _altar = UnityEngine.Object.FindObjectOfType<SurvivalObjectBurnController>(); SurvivalObjectBurnController _altar = UnityEngine.Object.FindObjectOfType<SurvivalObjectBurnController>();