source: binary-improvements/7dtd-server-fixes/src/AllocsRequestToSpawnPlayer.cs@ 77

Last change on this file since 77 was 76, checked in by alloc, 10 years ago

fixer

File size: 867 bytes
RevLine 
[75]1using System;
[76]2using System.Collections.Generic;
[75]3
4public 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.