Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using UnityEngine;
|
---|
4 |
|
---|
5 | public class AllocsLogFunctions
|
---|
6 | {
|
---|
7 | public static void RequestToSpawnPlayer (GameManager manager, int _clientId, string _name, string _playerClassname, string _skinTexture, int _chunkViewDim)
|
---|
8 | {
|
---|
9 | string ip = manager.connectionManager.connectedClients [_clientId].networkPlayer.ipAddress;
|
---|
10 | string name = string.Empty;
|
---|
11 | int entityId = -1;
|
---|
12 | Dictionary<int,int> d = manager.connectionManager.mapClientToEntity;
|
---|
13 | if (d.ContainsKey (_clientId)) {
|
---|
14 | entityId = d [_clientId];
|
---|
15 | World w = manager.World;
|
---|
16 | name = w.playerEntities.dict [entityId].EntityName;
|
---|
17 | }
|
---|
18 |
|
---|
19 | Log.Out ("Player connected, clientid=" + _clientId +
|
---|
20 | ", entityid=" + entityId +
|
---|
21 | ", name=" + name +
|
---|
22 | ", steamid=" + SingletonMonoBehaviour<Authenticator>.Instance.GetPlayerId (name) +
|
---|
23 | ", ip=" + ip
|
---|
24 | );
|
---|
25 | }
|
---|
26 |
|
---|
27 | public static void ExecuteCmdFromClient (ConsoleSdtd console, NetworkPlayer _networkPlayer, string _playerID, string _command)
|
---|
28 | {
|
---|
29 | Log.Out ("Executed command \"" + _command + "\" from player \"" + _playerID + "\"");
|
---|
30 | }
|
---|
31 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.