mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 05:53:50 +00:00
Fix setting of default classes and initialize classes safely on server
This commit is contained in:
parent
970e9aff2f
commit
941d76fce0
2 changed files with 2 additions and 1 deletions
|
@ -35,6 +35,7 @@ void Players::NewPlayer(RakNet::RakNetGUID id)
|
||||||
players[id]->Npc()->blank();
|
players[id]->Npc()->blank();
|
||||||
players[id]->NpcStats()->blank();
|
players[id]->NpcStats()->blank();
|
||||||
players[id]->CreatureStats()->blank();
|
players[id]->CreatureStats()->blank();
|
||||||
|
players[id]->klass.blank();
|
||||||
|
|
||||||
for (int i = 0; i < mwmp::Networking::Get().MaxConnections(); i++)
|
for (int i = 0; i < mwmp::Networking::Get().MaxConnections(); i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -594,7 +594,7 @@ void LocalPlayer::SetClass()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getMechanicsManager()->setPlayerClass(klass);
|
MWBase::Environment::get().getMechanicsManager()->setPlayerClass(klass.mId);
|
||||||
const ESM::Class *_klass = MWBase::Environment::get().getWorld()->getStore().get<ESM::Class>().find(klass.mId);
|
const ESM::Class *_klass = MWBase::Environment::get().getWorld()->getStore().get<ESM::Class>().find(klass.mId);
|
||||||
if (_klass)
|
if (_klass)
|
||||||
MWBase::Environment::get().getWindowManager()->setPlayerClass(klass);
|
MWBase::Environment::get().getWindowManager()->setPlayerClass(klass);
|
||||||
|
|
Loading…
Reference in a new issue