private bool FindPlayer(IMyPlayer player, long id) { if (player.IdentityId == id) { Players[id] = player; SteamToPlayer[player.SteamUserId] = id; PlayerMouseStates[id] = new MouseStateData(); PlayerEventId++; if (player.SteamUserId == AuthorSteamId) { AuthorPlayerId = player.IdentityId; } } return(false); }
internal bool KeenFuckery() { try { if (Session?.Player == null) { return(false); } MultiplayerId = MyAPIGateway.Multiplayer.MyId; PlayerId = Session.Player.IdentityId; if (HandlesInput) { List <IMyPlayer> players = new List <IMyPlayer>(); MyAPIGateway.Multiplayer.Players.GetPlayers(players); for (int i = 0; i < players.Count; i++) { PlayerConnected(players[i].IdentityId); } PlayerMouseStates[PlayerId] = UiInput.ClientMouseState; } PlayerMouseStates[-1] = new MouseStateData(); if (IsClient) { SendUpdateRequest(-1, PacketType.RequestMouseStates); } return(true); } catch (Exception ex) { Log.Line($"Exception in UpdatingStopped: {ex} - Session:{Session != null} - Player:{Session?.Player != null} - ClientMouseState:{UiInput.ClientMouseState != null}"); } return(false); }
internal UiInput(Session session) { _session = session; ClientMouseState = new MouseStateData(); }
public override void CleanUp() { base.CleanUp(); Data = null; }