fix(bridge): map.live names a player by userID, not UserIDString
The phase 14 walk read `steamId: null` for every sleeper made on the server: UserIDString is a cached string the game fills for a player it has seen connect. An id the map cannot name is an own dot and a clan mate the site can never match, so the map reads the id from userID itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
This commit is contained in:
@@ -9027,6 +9027,18 @@ namespace Oxide.Plugins
|
||||
CurrentPicture();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A player's Steam id as text, from <c>userID</c> itself. <c>UserIDString</c> is a
|
||||
/// cached string the game fills for a player it has seen connect, and the phase 14 walk
|
||||
/// read it back empty from a sleeper made on the server: an id the map could not name
|
||||
/// is an own dot and a clan mate the site can never find.
|
||||
/// </summary>
|
||||
private static string SteamIdOf(BasePlayer p)
|
||||
{
|
||||
ulong id = p.userID;
|
||||
return id.ToString(System.Globalization.CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
private static bool Gone(BaseEntity e)
|
||||
{
|
||||
return e == null || e.IsDestroyed || e.transform == null;
|
||||
@@ -9133,7 +9145,7 @@ namespace Oxide.Plugins
|
||||
continue;
|
||||
|
||||
Dictionary<string, object> row = At(p.transform.position);
|
||||
row["steamId"] = p.UserIDString;
|
||||
row["steamId"] = SteamIdOf(p);
|
||||
row["name"] = p.displayName;
|
||||
row["sleeping"] = p.IsSleeping();
|
||||
row["online"] = true;
|
||||
@@ -9156,7 +9168,7 @@ namespace Oxide.Plugins
|
||||
}
|
||||
|
||||
Dictionary<string, object> row = At(p.transform.position);
|
||||
row["steamId"] = p.UserIDString;
|
||||
row["steamId"] = SteamIdOf(p);
|
||||
row["name"] = p.displayName;
|
||||
row["sleeping"] = true;
|
||||
row["online"] = false;
|
||||
|
||||
Reference in New Issue
Block a user