Rev | Line | |
---|
[75] | 1 | using System;
|
---|
[76] | 2 | using System.Collections.Generic;
|
---|
[75] | 3 |
|
---|
| 4 | public class AllocsRequestToSpawnPlayer
|
---|
| 5 | {
|
---|
| 6 | public static void RequestToSpawnPlayer (GameManager manager, int _clientId, string _name, string _playerClassname, string _skinTexture, int _chunkViewDim)
|
---|
| 7 | {
|
---|
| 8 | string ip = manager.connectionManager.connectedClients [_clientId].networkPlayer.ipAddress;
|
---|
[76] | 9 | string name = string.Empty;
|
---|
| 10 | int entityId = -1;
|
---|
| 11 | Dictionary<int,int> d = manager.connectionManager.mapClientToEntity;
|
---|
| 12 | if (d.ContainsKey (_clientId)) {
|
---|
| 13 | entityId = d [_clientId];
|
---|
| 14 | World w = manager.World;
|
---|
| 15 | name = w.playerEntities.dict [entityId].EntityName;
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | Log.Out ("Player connected, clientid=" + _clientId +
|
---|
| 19 | ", entityid=" + entityId +
|
---|
| 20 | ", name=" + name +
|
---|
| 21 | ", steamid=" + SingletonMonoBehaviour<Authenticator>.Instance.GetPlayerId (name) +
|
---|
| 22 | ", ip=" + ip);
|
---|
[75] | 23 | }
|
---|
| 24 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.