Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
cloning: apply a pending clone sync before changing ownership of a mi…
…grating object
  • Loading branch information
blattersturm committed Jul 2, 2019
1 parent 61dec4f commit fd04e57
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions code/components/gta-net-five/src/CloneManager.cpp
Expand Up @@ -903,9 +903,6 @@ bool CloneManagerLocal::HandleCloneUpdate(const msgClone& msg)

auto obj = objIt->second;

// update client id if changed
CheckMigration(msg);

if (msg.GetClientId() == m_netLibrary->GetServerNetID())
{
Log("%s: our object, bailing out\n", __func__);
Expand Down Expand Up @@ -952,6 +949,10 @@ bool CloneManagerLocal::HandleCloneUpdate(const msgClone& msg)
// call post-apply
obj->m_1D0();

// update client id if changed
// this has to be done AFTER apply since the sync update might contain critical state we didn't have yet!
CheckMigration(msg);

ackPacket();

return true;
Expand Down

0 comments on commit fd04e57

Please sign in to comment.