mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 22:22:54 +02:00
Merge pull request #13215 from AndrewMeadows/activate-on-action-removal
activate RigidBody when removing physics Action
This commit is contained in:
commit
4175825093
2 changed files with 8 additions and 1 deletions
|
@ -159,6 +159,13 @@ void ObjectDynamic::removeFromSimulation(EntitySimulationPointer simulation) con
|
||||||
simulation->removeDynamic(myID);
|
simulation->removeDynamic(myID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ObjectDynamic::setOwnerEntity(const EntityItemPointer ownerEntity) {
|
||||||
|
if (!ownerEntity) {
|
||||||
|
activateBody();
|
||||||
|
}
|
||||||
|
_ownerEntity = ownerEntity;
|
||||||
|
}
|
||||||
|
|
||||||
EntityItemPointer ObjectDynamic::getEntityByID(EntityItemID entityID) const {
|
EntityItemPointer ObjectDynamic::getEntityByID(EntityItemID entityID) const {
|
||||||
EntityItemPointer ownerEntity;
|
EntityItemPointer ownerEntity;
|
||||||
withReadLock([&]{
|
withReadLock([&]{
|
||||||
|
|
|
@ -33,7 +33,7 @@ public:
|
||||||
|
|
||||||
virtual void removeFromSimulation(EntitySimulationPointer simulation) const override;
|
virtual void removeFromSimulation(EntitySimulationPointer simulation) const override;
|
||||||
virtual EntityItemWeakPointer getOwnerEntity() const override { return _ownerEntity; }
|
virtual EntityItemWeakPointer getOwnerEntity() const override { return _ownerEntity; }
|
||||||
virtual void setOwnerEntity(const EntityItemPointer ownerEntity) override { _ownerEntity = ownerEntity; }
|
virtual void setOwnerEntity(const EntityItemPointer ownerEntity) override;
|
||||||
|
|
||||||
virtual void invalidate() {};
|
virtual void invalidate() {};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue