[Client] Send all data for newly initialized LocalActors at least once

master
David Cernat 5 years ago
parent e70fd2cf3a
commit 433a69a588

@ -82,8 +82,10 @@ void Cell::updateLocal(bool forceUpdate)
}
else
{
// Forcibly update this local actor if its data has never been sent before;
// otherwise, use the current forceUpdate value
if (actor->getPtr().getRefData().isEnabled())
actor->update(forceUpdate);
actor->update(actor->hasSentData ? forceUpdate : true);
++it;
}

@ -22,6 +22,7 @@ using namespace std;
LocalActor::LocalActor()
{
hasSentData = false;
posWasChanged = false;
equipmentChanged = false;
@ -61,6 +62,8 @@ void LocalActor::update(bool forceUpdate)
updateSpeech();
updateAttack();
}
hasSentData = true;
}
void LocalActor::updateCell()

@ -28,6 +28,7 @@ namespace mwmp
MWWorld::Ptr getPtr();
void setPtr(const MWWorld::Ptr& newPtr);
bool hasSentData;
bool wasDead;
private:

Loading…
Cancel
Save