diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 1d1ece78a..7b7560082 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -940,19 +940,16 @@ namespace MWWorld if (Misc::StringUtils::ciEqual(record.mId, "player")) { - static const char *sRaces[] = - { - "Argonian", "Breton", "Dark Elf", "High Elf", "Imperial", "Khajiit", "Nord", "Orc", "Redguard", - "Woodelf", 0 - }; + std::vector ids; + getStore().get().listIdentifier(ids); - int i=0; + unsigned int i=0; - for (; sRaces[i]; ++i) - if (Misc::StringUtils::ciEqual (sRaces[i], record.mRace)) + for (; isetInt ("pcrace", sRaces[i] ? i+1 : 0); + mGlobalVariables->setInt ("pcrace", (i == ids.size()) ? 0 : i+1); const ESM::NPC *player = mPlayer->getPlayer().get()->mBase;