public override void Init(int clientId, bool dummy) { base.Init(clientId, dummy); Server = Kernel.Get <BaseServer>(); GameContext = Kernel.Get <BaseGameContext>(); Config = Kernel.Get <BaseConfig>(); RespawnTick = Server.Tick; DieTick = Server.Tick; Character = null; Team = GameContext.GameController.StartTeam(); SpectatorMode = SpectatorMode.FreeView; SpectatorId = -1; SpectatorFlag = null; ActiveSpectatorSwitch = false; LastActionTick = Server.Tick; TeamChangeTick = Server.Tick; InactivityTickCounter = 0; IsReadyToPlay = !GameContext.GameController.IsPlayerReadyMode(); RespawnDisabled = GameContext.GameController.GetRespawnDisabled(this); DeadSpectatorMode = false; Spawning = false; ActualLatency = new int[GameContext.Players.Length]; Latency = new Latency(); LatestActivity = new Activity(); PlayerFlags = PlayerFlags.None; TeeInfo = new TeeInfo(); }
public override void Init(int clientId, Team startTeam) { base.Init(clientId, startTeam); Team = startTeam; ActLatency = new int[Server.MaxClients]; Latency = new Latency(); TeeInfo = new TeeInfo(); LatestActivity = new Activity(); IsReady = false; LastSetTeam = Server.Tick; LastChangeInfo = -1; SpectatorId = -1; Spawning = false; var idMap = BaseServer.GetIdMap(clientId); for (var i = 1; i < BaseServer.VANILLA_MAX_CLIENTS; i++) { Server.IdMap[idMap + i] = -1; } Server.IdMap[idMap] = clientId; }