Ejemplo n.º 1
0
    public void TryClear(BaseEntity.RPCMessage msg)
    {
        IOEntity component;

        if (!WireTool.CanPlayerUseWires(msg.player))
        {
            return;
        }
        uint            num             = msg.read.UInt32();
        BaseNetworkable baseNetworkable = BaseNetworkable.serverEntities.Find(num);

        if (baseNetworkable == null)
        {
            component = null;
        }
        else
        {
            component = baseNetworkable.GetComponent <IOEntity>();
        }
        IOEntity oEntity = component;

        if (oEntity == null)
        {
            return;
        }
        oEntity.ClearConnections();
        oEntity.SendNetworkUpdate(BasePlayer.NetworkQueue.Update);
    }
Ejemplo n.º 2
0
 private void CheckPosition()
 {
     if (!ioEntity.isClient && Vector3.SqrMagnitude(base.transform.position - prevPos) > 0.00250000018f)
     {
         prevPos = base.transform.position;
         ioEntity.ClearConnections();
     }
 }
Ejemplo n.º 3
0
    public void TryClear(BaseEntity.RPCMessage msg)
    {
        if (!WireTool.CanPlayerUseWires(msg.player))
        {
            return;
        }
        uint            uid             = msg.read.UInt32();
        BaseNetworkable baseNetworkable = BaseNetworkable.serverEntities.Find(uid);
        IOEntity        ioEntity        = Object.op_Equality((Object)baseNetworkable, (Object)null) ? (IOEntity)null : (IOEntity)((Component)baseNetworkable).GetComponent <IOEntity>();

        if (Object.op_Equality((Object)ioEntity, (Object)null))
        {
            return;
        }
        ioEntity.ClearConnections();
        ioEntity.SendNetworkUpdate(BasePlayer.NetworkQueue.Update);
    }