SHARE
TWEET

Untitled

a guest Apr 25th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public struct NetworkEntity
  2. {
  3.         public static NetworkEntity InvalidEntity = new NetworkEntity();
  4.  
  5.         public int NetId { get; private set; }
  6.         public int LocalId => API.NetworkGetEntityFromNetworkId(NetId); // call this every time I need to work on the entity
  7.         public bool Exists => NetId != 0;
  8.  
  9.         public NetworkEntity(int netID)
  10.         {
  11.             if (netID == 0)
  12.             {
  13.                 throw new ArgumentException("netID == 0");
  14.             }
  15.  
  16.             NetId = netID;
  17.         }
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top