Merge pull request #1 from pozhiloy-enotik/master
You can fly even in lobby
This commit was merged in pull request #1.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace DevourClient.Helpers
|
||||
{
|
||||
public class Player
|
||||
@@ -7,5 +9,22 @@
|
||||
OptionsHelpers optionsHelpers = UnityEngine.Object.FindObjectOfType<OptionsHelpers>();
|
||||
return optionsHelpers.inGame;
|
||||
}
|
||||
|
||||
public static bool IsInGameOrLobby()
|
||||
{
|
||||
return GetPlayer() != null;
|
||||
}
|
||||
|
||||
public static NolanBehaviour GetPlayer()
|
||||
{
|
||||
foreach (NolanBehaviour nb in UnityEngine.Object.FindObjectsOfType<NolanBehaviour>())
|
||||
{
|
||||
if (nb.entity.IsOwner)
|
||||
{
|
||||
return nb;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace DevourClient
|
||||
Hacks.Misc.SetSteamName("patate");
|
||||
}
|
||||
|
||||
if (this.fly && Player.IsInGame())
|
||||
if (this.fly && Player.IsInGameOrLobby())
|
||||
{
|
||||
Hacks.Misc.Fly(this.fly_speed);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user