mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 05:03:31 +02:00
fix bug preventing sim owenrship on local domain
This commit is contained in:
parent
22ced025cd
commit
13538006ec
1 changed files with 5 additions and 5 deletions
|
@ -686,18 +686,18 @@ int EntityItem::readEntityDataFromBuffer(const unsigned char* data, int bytesLef
|
||||||
weOwnSimulation = _simulationOwner.matchesValidID(myNodeID);
|
weOwnSimulation = _simulationOwner.matchesValidID(myNodeID);
|
||||||
}
|
}
|
||||||
} else if (_simulationOwner.pendingTake(now - maxPingRoundTrip)) {
|
} else if (_simulationOwner.pendingTake(now - maxPingRoundTrip)) {
|
||||||
// we sent a bid before this packet could have been sent from the server
|
// we sent a bid already but maybe before this packet was sent from the server
|
||||||
// so we ignore it and pretend we own the object's simulation
|
|
||||||
weOwnSimulation = true;
|
weOwnSimulation = true;
|
||||||
if (newSimOwner.getID().isNull()) {
|
if (newSimOwner.getID().isNull()) {
|
||||||
// entity-server is trying to clear someone else's ownership
|
// the entity-server is trying to clear someone else's ownership
|
||||||
// but we want to own it, therefore we ignore this clear event
|
|
||||||
if (!_simulationOwner.isNull()) {
|
if (!_simulationOwner.isNull()) {
|
||||||
// someone else really did own it
|
|
||||||
markDirtyFlags(Simulation::DIRTY_SIMULATOR_ID);
|
markDirtyFlags(Simulation::DIRTY_SIMULATOR_ID);
|
||||||
somethingChanged = true;
|
somethingChanged = true;
|
||||||
_simulationOwner.clearCurrentOwner();
|
_simulationOwner.clearCurrentOwner();
|
||||||
}
|
}
|
||||||
|
} else if (newSimOwner.getID() == myNodeID) {
|
||||||
|
// the entity-server is awarding us ownership which is what we want
|
||||||
|
_simulationOwner.set(newSimOwner);
|
||||||
}
|
}
|
||||||
} else if (newSimOwner.matchesValidID(myNodeID) && !_hasBidOnSimulation) {
|
} else if (newSimOwner.matchesValidID(myNodeID) && !_hasBidOnSimulation) {
|
||||||
// entity-server tells us that we have simulation ownership while we never requested this for this EntityItem,
|
// entity-server tells us that we have simulation ownership while we never requested this for this EntityItem,
|
||||||
|
|
Loading…
Reference in a new issue