[General] Make ID_OBJECT_PLACE take effect only when sent back by server

0.6.1
David Cernat 8 years ago
parent 2bd81c3de0
commit 8b8c01f389

@ -25,6 +25,9 @@ namespace mwmp
event.objectChanges.objects.at(i).mpNum = mwmp::Networking::getPtr()->getNextMpNum();
}
// Send this packet back to the original sender with the mpNum generation from above,
// then send it to the other players
packet.Send(false);
packet.Send(true);
Script::Call<Script::CallbackIdentity("OnObjectPlace")>(player.getId(), event.cell.getDescription().c_str());

@ -95,6 +95,17 @@ namespace MWGui
End of tes3mp addition
*/
/*
Start of tes3mp change (major)
Instead of actually keeping this object as is, delete it after sending the packet
and wait for the server to send it back with the correct mpNum
*/
MWBase::Environment::get().getWorld()->deleteObject(dropped);
/*
End of tes3mp change (major)
*/
return dropped;
}

@ -581,6 +581,17 @@ namespace MWScript
/*
End of tes3mp addition
*/
/*
Start of tes3mp change (major)
Instead of actually keeping this object as is, delete it after sending the packet
and wait for the server to send it back with the correct mpNum
*/
MWBase::Environment::get().getWorld()->deleteObject(ptr);
/*
End of tes3mp change (major)
*/
}
}
};

Loading…
Cancel
Save