forked from teamnwah/openmw-tes3coop
Add fail-safes to DedicatedPlayer cell updating to narrow down problems
This commit is contained in:
parent
e39b66af4f
commit
1bbd7c271f
1 changed files with 8 additions and 1 deletions
|
@ -406,13 +406,20 @@ void DedicatedPlayer::UpdateDrawState()
|
|||
|
||||
void DedicatedPlayer::updateCell()
|
||||
{
|
||||
// Prevent cell update when player hasn't been instantiated yet
|
||||
if (state == 0)
|
||||
return;
|
||||
|
||||
MWBase::World *world = MWBase::Environment::get().getWorld();
|
||||
MWWorld::CellStore *cellStore;
|
||||
|
||||
if (cell.isExterior() == 1)
|
||||
cellStore = world->getExterior(cell.mCellId.mIndex.mX, cell.mCellId.mIndex.mY);
|
||||
else
|
||||
else if (!cell.mName.empty())
|
||||
cellStore = world->getInterior(cell.mName);
|
||||
// Go no further if cell data is invalid
|
||||
else
|
||||
return;
|
||||
|
||||
// tes3mp debug start
|
||||
printf("Server says %s (%s) moved to %s\n",
|
||||
|
|
Loading…
Reference in a new issue