diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2021-01-02 14:50:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-02 14:50:34 +0100 |
commit | 16aeb84cd35996a6b41f10cbc48a677eeccc911c (patch) | |
tree | ae877926559d59a534bbf3c22651e6df7ffe8d71 /src/BlockEntities/BeaconEntity.cpp | |
parent | Fix version typo in CMakeLists.txt (#5098) (diff) | |
download | cuberite-16aeb84cd35996a6b41f10cbc48a677eeccc911c.tar cuberite-16aeb84cd35996a6b41f10cbc48a677eeccc911c.tar.gz cuberite-16aeb84cd35996a6b41f10cbc48a677eeccc911c.tar.bz2 cuberite-16aeb84cd35996a6b41f10cbc48a677eeccc911c.tar.lz cuberite-16aeb84cd35996a6b41f10cbc48a677eeccc911c.tar.xz cuberite-16aeb84cd35996a6b41f10cbc48a677eeccc911c.tar.zst cuberite-16aeb84cd35996a6b41f10cbc48a677eeccc911c.zip |
Diffstat (limited to 'src/BlockEntities/BeaconEntity.cpp')
-rw-r--r-- | src/BlockEntities/BeaconEntity.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/BlockEntities/BeaconEntity.cpp b/src/BlockEntities/BeaconEntity.cpp index a7bdbca2d..e59d31f52 100644 --- a/src/BlockEntities/BeaconEntity.cpp +++ b/src/BlockEntities/BeaconEntity.cpp @@ -271,6 +271,20 @@ void cBeaconEntity::CopyFrom(const cBlockEntity & a_Src) +void cBeaconEntity::OnRemoveFromWorld() +{ + const auto Window = GetWindow(); + if (Window != nullptr) + { + // Tell window its owner is destroyed: + Window->OwnerDestroyed(); + } +} + + + + + void cBeaconEntity::SendTo(cClientHandle & a_Client) { a_Client.SendUpdateBlockEntity(*this); @@ -316,6 +330,3 @@ bool cBeaconEntity::UsedBy(cPlayer * a_Player) } return true; } - - - |