Fix setting of default classes and initialize classes safely on server

pull/58/head
David Cernat 8 years ago
parent 970e9aff2f
commit 941d76fce0

@ -35,6 +35,7 @@ void Players::NewPlayer(RakNet::RakNetGUID id)
players[id]->Npc()->blank();
players[id]->NpcStats()->blank();
players[id]->CreatureStats()->blank();
players[id]->klass.blank();
for (int i = 0; i < mwmp::Networking::Get().MaxConnections(); i++)
{

@ -594,7 +594,7 @@ void LocalPlayer::SetClass()
}
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);
if (_klass)
MWBase::Environment::get().getWindowManager()->setPlayerClass(klass);

Loading…
Cancel
Save