mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 02:52:57 +02:00
fix grabbing
This commit is contained in:
parent
072e818c99
commit
e316f71b31
1 changed files with 11 additions and 11 deletions
|
@ -2063,17 +2063,6 @@ bool EntityItem::removeActionInternal(const QUuid& actionID, EntitySimulationPoi
|
||||||
}
|
}
|
||||||
|
|
||||||
EntityDynamicPointer action = _objectActions[actionID];
|
EntityDynamicPointer action = _objectActions[actionID];
|
||||||
|
|
||||||
action->setOwnerEntity(nullptr);
|
|
||||||
action->setIsMine(false);
|
|
||||||
|
|
||||||
if (simulation) {
|
|
||||||
action->removeFromSimulation(simulation);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool success = true;
|
|
||||||
serializeActions(success, _allActionsDataCache);
|
|
||||||
_dirtyFlags |= Simulation::DIRTY_PHYSICS_ACTIVATION;
|
|
||||||
auto removedActionType = action->getType();
|
auto removedActionType = action->getType();
|
||||||
if ((removedActionType == DYNAMIC_TYPE_HOLD || removedActionType == DYNAMIC_TYPE_FAR_GRAB) && !stillHasGrabActions()) {
|
if ((removedActionType == DYNAMIC_TYPE_HOLD || removedActionType == DYNAMIC_TYPE_FAR_GRAB) && !stillHasGrabActions()) {
|
||||||
_dirtyFlags &= ~Simulation::NO_BOOTSTRAPPING;
|
_dirtyFlags &= ~Simulation::NO_BOOTSTRAPPING;
|
||||||
|
@ -2090,6 +2079,17 @@ bool EntityItem::removeActionInternal(const QUuid& actionID, EntitySimulationPoi
|
||||||
// because they should have been set correctly when the action was added
|
// because they should have been set correctly when the action was added
|
||||||
// and/or when children were linked
|
// and/or when children were linked
|
||||||
}
|
}
|
||||||
|
action->setOwnerEntity(nullptr);
|
||||||
|
action->setIsMine(false);
|
||||||
|
_objectActions.remove(actionID);
|
||||||
|
|
||||||
|
if (simulation) {
|
||||||
|
action->removeFromSimulation(simulation);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool success = true;
|
||||||
|
serializeActions(success, _allActionsDataCache);
|
||||||
|
_dirtyFlags |= Simulation::DIRTY_PHYSICS_ACTIVATION;
|
||||||
_objectActions.remove(actionID);
|
_objectActions.remove(actionID);
|
||||||
setDynamicDataNeedsTransmit(true);
|
setDynamicDataNeedsTransmit(true);
|
||||||
return success;
|
return success;
|
||||||
|
|
Loading…
Reference in a new issue