Пример #1
0
 public QTMessageLog(int _index, QTMessage _message, BaseQTClient _client)
 {
     index       = _index;
     type        = _message.messageType;
     messageSize = QTUtils.ObjectToByteArray(_message).Length;
     identity    = _client.getIP();
 }
Пример #2
0
    public void spawnPlayer(BaseQTClient client)
    {
        QTDebugger.instance.debug(QTDebugger.debugType.BASE, "Spawning player for Client(" + client.getIP() + ")...");

        ServerQTObject obj = (ServerQTObject)WorkerServerManager.instance.spawnManager.spawnObject(Guid.NewGuid().ToString(), "Player", QTUtils.getSyncPositionMessage(0f, 3f, 0f), QTUtils.getSyncRotationMessage());

        obj.setServerOwner(client.session.id);

        players.Add(client.session.id, obj);
    }
Пример #3
0
    public void despawnPlayer(BaseQTClient client)
    {
        if (players.ContainsKey(client.session.id) == false)
        {
            return;
        }
        QTDebugger.instance.debug(QTDebugger.debugType.BASE, "Despawning player of Client(" + client.getIP() + ")...");

        ServerQTObject obj = players[client.session.id];

        WorkerServerManager.instance.spawnManager.despawnObject(obj.objectID);

        players.Remove(client.session.id);
    }
Пример #4
0
 public void debugLostConnection(BaseQTClient client)
 {
     QTDebugger.instance.debug(QTDebugger.debugType.BASE, "Client(" + client.getIP() + ") disconnected...");
 }