net status will be available in Utilities namespace

This commit is contained in:
in0finite 2019-06-24 01:54:25 +02:00
parent e9f01099f0
commit a135d2a8bd
4 changed files with 25 additions and 3 deletions

View file

@ -5,7 +5,7 @@ using SanAndreasUnity.Utilities;
namespace SanAndreasUnity.Net
{
public class NetManager
public class NetManager : MonoBehaviour
{
public static int defaultListenPortNumber { get { return 7777; } }
@ -27,6 +27,13 @@ namespace SanAndreasUnity.Net
void Awake ()
{
// assign implementation in NetUtils
NetUtils.IsServerImpl = () => NetStatus.IsServer;
}
public static void StartServer( int portNumber ) {
CheckIfNetworkIsStarted ();

View file

@ -0,0 +1,16 @@
namespace SanAndreasUnity.Utilities
{
public class NetUtils
{
public static System.Func<bool> IsServerImpl = () => false;
public static bool IsServer => IsServerImpl();
}
}

View file

@ -20,6 +20,7 @@
- port the whole UI to multiplayer
- **vehicle is bumping on clients** - disable (or destroy) wheel colliders, and sync them - this should not be done on local player, see below
- when exit vehicle anim is finished on client, it is repeated - change wrap mode

View file

@ -18,8 +18,6 @@
- Gravity setting failed to load on windows - instead of 9.81, it's loaded as 981 - maybe it happens when float.ToString() gives e
- Minimap does not follow ped
- Update controls window
- Add option to change fixed delta time ?