mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-23 15:52:55 +01:00
Use different name table offset depending on staff type (#22813)
This commit is contained in:
@@ -1608,7 +1608,14 @@ void Peep::FormatNameTo(Formatter& ft) const
|
|||||||
|
|
||||||
if ((!isStaff && showGuestNames) || (isStaff && showStaffNames))
|
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);
|
ft.Add<StringId>(realNameStringId);
|
||||||
}
|
}
|
||||||
else if (isStaff)
|
else if (isStaff)
|
||||||
|
|||||||
Reference in New Issue
Block a user