Fix importing custom peep/staff names, fix formatting

This commit is contained in:
Gymnasiast 2017-01-22 15:53:01 +01:00
parent 91499e0942
commit 0a83bb8b15
1 changed files with 13 additions and 2 deletions

View File

@ -381,7 +381,6 @@ private:
case OBJECT_TYPE_WALLS:
case OBJECT_TYPE_PATHS:
case OBJECT_TYPE_PATH_BITS:
{
EntryList * entries = GetEntryList(objectType);
// Check if there are spare entries available
@ -392,7 +391,6 @@ private:
}
break;
}
}
}
}
}
@ -849,7 +847,20 @@ private:
dst->sprite_direction = src->sprite_direction;
// Peep name
dst->name_string_idx = src->name_string_idx;
if (is_user_string_id(src->name_string_idx))
{
const char * peepName = GetUserString(src->name_string_idx);
if (peepName[0] != 0)
{
rct_string_id peepNameStringId = user_string_allocate(4, peepName);
if (peepNameStringId != 0)
{
dst->name_string_idx = peepNameStringId;
}
}
}
dst->outside_of_park = src->outside_of_park;