Ignore:
Timestamp:
Sep 4, 2018, 2:33:52 PM (6 years ago)
Author:
alloc
Message:

More cleanup, allocation improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements/AllocsCommands/PrivateMessageConnections.cs

    r325 r326  
    1111
    1212                public static ClientInfo GetLastPMSenderForPlayer (ClientInfo _player) {
    13                         if (senderOfLastPM.ContainsKey (_player.steamId)) {
    14                                 CSteamID recSteamId = senderOfLastPM [_player.steamId];
    15                                 ClientInfo recInfo = ConnectionManager.Instance.Clients.ForSteamId (recSteamId);
    16                                 return recInfo;
     13                        if (!senderOfLastPM.ContainsKey (_player.steamId)) {
     14                                return null;
    1715                        }
    1816
    19                         return null;
     17                        CSteamID recSteamId = senderOfLastPM [_player.steamId];
     18                        ClientInfo recInfo = ConnectionManager.Instance.Clients.ForSteamId (recSteamId);
     19                        return recInfo;
    2020                }
    2121        }
Note: See TracChangeset for help on using the changeset viewer.