mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 22:16:58 +02:00
set _actionDataDirty when adding an action.
This commit is contained in:
parent
3c41df53e4
commit
cd934bab90
2 changed files with 19 additions and 3 deletions
|
@ -1705,16 +1705,31 @@ void EntityItem::setPendingOwnershipPriority(quint8 priority, const quint64& tim
|
||||||
_simulationOwner.setPendingPriority(priority, timestamp);
|
_simulationOwner.setPendingPriority(priority, timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString EntityItem::actionsToDebugString() {
|
||||||
|
QString result;
|
||||||
|
QVector<QByteArray> serializedActions;
|
||||||
|
QHash<QUuid, EntityActionPointer>::const_iterator i = _objectActions.begin();
|
||||||
|
while (i != _objectActions.end()) {
|
||||||
|
const QUuid id = i.key();
|
||||||
|
EntityActionPointer action = _objectActions[id];
|
||||||
|
EntityActionType actionType = action->getType();
|
||||||
|
result += QString("") + actionType + ":" + action->getID().toString() + " ";
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
bool EntityItem::addAction(EntitySimulation* simulation, EntityActionPointer action) {
|
bool EntityItem::addAction(EntitySimulation* simulation, EntityActionPointer action) {
|
||||||
bool result;
|
bool result;
|
||||||
withWriteLock([&] {
|
withWriteLock([&] {
|
||||||
checkWaitingToRemove(simulation);
|
checkWaitingToRemove(simulation);
|
||||||
|
|
||||||
result = addActionInternal(simulation, action);
|
result = addActionInternal(simulation, action);
|
||||||
if (!result) {
|
if (result) {
|
||||||
removeActionInternal(action->getID());
|
|
||||||
} else {
|
|
||||||
action->setIsMine(true);
|
action->setIsMine(true);
|
||||||
|
_actionDataDirty = true;
|
||||||
|
} else {
|
||||||
|
removeActionInternal(action->getID());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -378,6 +378,7 @@ public:
|
||||||
void grabSimulationOwnership();
|
void grabSimulationOwnership();
|
||||||
void flagForMotionStateChange() { _dirtyFlags |= Simulation::DIRTY_MOTION_TYPE; }
|
void flagForMotionStateChange() { _dirtyFlags |= Simulation::DIRTY_MOTION_TYPE; }
|
||||||
|
|
||||||
|
QString actionsToDebugString();
|
||||||
bool addAction(EntitySimulation* simulation, EntityActionPointer action);
|
bool addAction(EntitySimulation* simulation, EntityActionPointer action);
|
||||||
bool updateAction(EntitySimulation* simulation, const QUuid& actionID, const QVariantMap& arguments);
|
bool updateAction(EntitySimulation* simulation, const QUuid& actionID, const QVariantMap& arguments);
|
||||||
bool removeAction(EntitySimulation* simulation, const QUuid& actionID);
|
bool removeAction(EntitySimulation* simulation, const QUuid& actionID);
|
||||||
|
|
Loading…
Reference in a new issue