1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-21 14:53:02 +01:00

Use different name table offset depending on staff type (#22813)

This commit is contained in:
Aaron van Geffen
2024-09-25 18:03:42 +02:00
committed by GitHub
parent 04bdff052f
commit 81b759e74e

View File

@@ -1608,7 +1608,14 @@ void Peep::FormatNameTo(Formatter& ft) const
if ((!isStaff && showGuestNames) || (isStaff && showStaffNames))
{
auto realNameStringId = GetRealNameStringIDFromPeepID(PeepId);
auto nameId = PeepId;
if (isStaff)
{
// Prevent staff from getting the same names by offsetting the name table based on staff type.
nameId *= 256 * EnumValue(staff->AssignedStaffType) + 1;
}
auto realNameStringId = GetRealNameStringIDFromPeepID(nameId);
ft.Add<StringId>(realNameStringId);
}
else if (isStaff)