mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 11:23:51 +00:00
Issue #474: adjust global variable pcrace
This commit is contained in:
parent
3db850a7d1
commit
8e1a2e3a13
1 changed files with 24 additions and 6 deletions
|
@ -203,6 +203,8 @@ namespace MWWorld
|
||||||
mGlobalVariables->setInt ("chargenstate", 1);
|
mGlobalVariables->setInt ("chargenstate", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mGlobalVariables->setInt ("pcrace", 3);
|
||||||
|
|
||||||
mWorldScene = new Scene(*mRendering, mPhysics);
|
mWorldScene = new Scene(*mRendering, mPhysics);
|
||||||
|
|
||||||
setFallbackValues(fallbackMap);
|
setFallbackValues(fallbackMap);
|
||||||
|
@ -802,7 +804,23 @@ namespace MWWorld
|
||||||
const ESM::NPC *World::createRecord(const ESM::NPC &record)
|
const ESM::NPC *World::createRecord(const ESM::NPC &record)
|
||||||
{
|
{
|
||||||
bool update = false;
|
bool update = false;
|
||||||
if (StringUtils::ciEqual(record.mId, "player")) {
|
|
||||||
|
if (StringUtils::ciEqual(record.mId, "player"))
|
||||||
|
{
|
||||||
|
static const char *sRaces[] =
|
||||||
|
{
|
||||||
|
"Argonian", "Breton", "Dark Elf", "High Elf", "Imperial", "Khajiit", "Nord", "Orc", "Redguard",
|
||||||
|
"Woodelf", 0
|
||||||
|
};
|
||||||
|
|
||||||
|
int i=0;
|
||||||
|
|
||||||
|
for (; sRaces[i]; ++i)
|
||||||
|
if (StringUtils::ciEqual (sRaces[i], record.mRace))
|
||||||
|
break;
|
||||||
|
|
||||||
|
mGlobalVariables->setInt ("pcrace", sRaces[i] ? i+1 : 0);
|
||||||
|
|
||||||
const ESM::NPC *player =
|
const ESM::NPC *player =
|
||||||
mPlayer->getPlayer().get<ESM::NPC>()->mBase;
|
mPlayer->getPlayer().get<ESM::NPC>()->mBase;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue