1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 13:33:02 +01:00

Do not use user strings for peep names

This commit is contained in:
Ted John
2019-07-21 20:44:19 +01:00
parent 61d64ab8c5
commit 40d49b93d3
27 changed files with 282 additions and 323 deletions

View File

@@ -623,8 +623,13 @@ static void window_title_command_editor_tool_down(rct_window* w, rct_widgetindex
if (spriteIdentifier == SPRITE_IDENTIFIER_PEEP)
{
validSprite = true;
Peep* peep = GET_PEEP(spriteIndex);
format_string(command.SpriteName, USER_STRING_MAX_LENGTH, peep->name_string_idx, &peep->id);
auto peep = GET_PEEP(spriteIndex);
if (peep != nullptr)
{
uint8_t formatArgs[32]{};
peep->FormatNameTo(formatArgs);
format_string(command.SpriteName, USER_STRING_MAX_LENGTH, STR_STRINGID, &peep->id);
}
}
else if (spriteIdentifier == SPRITE_IDENTIFIER_VEHICLE)
{