public QTMessageLog(int _index, QTMessage _message, BaseQTClient _client) { index = _index; type = _message.messageType; messageSize = QTUtils.ObjectToByteArray(_message).Length; identity = _client.getIP(); }
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); }
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); }
public void debugLostConnection(BaseQTClient client) { QTDebugger.instance.debug(QTDebugger.debugType.BASE, "Client(" + client.getIP() + ") disconnected..."); }