summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorLukas Pioch <lukas@zgow.de>2017-05-29 21:33:30 +0200
committerLukas Pioch <lukas@zgow.de>2017-06-05 15:14:23 +0200
commit7922e6addb06de89cc73c64d30321aa6710e30ce (patch)
tree8b35b17e08f41bf535ec25844bc7648697b083ec /src/Entities
parentAvoid pickups to sink into blocks and disappear (#3739) (diff)
downloadcuberite-7922e6addb06de89cc73c64d30321aa6710e30ce.tar
cuberite-7922e6addb06de89cc73c64d30321aa6710e30ce.tar.gz
cuberite-7922e6addb06de89cc73c64d30321aa6710e30ce.tar.bz2
cuberite-7922e6addb06de89cc73c64d30321aa6710e30ce.tar.lz
cuberite-7922e6addb06de89cc73c64d30321aa6710e30ce.tar.xz
cuberite-7922e6addb06de89cc73c64d30321aa6710e30ce.tar.zst
cuberite-7922e6addb06de89cc73c64d30321aa6710e30ce.zip
Diffstat (limited to 'src/Entities')
-rw-r--r--src/Entities/Minecart.cpp2
-rw-r--r--src/Entities/Player.cpp10
-rw-r--r--src/Entities/Player.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/Entities/Minecart.cpp b/src/Entities/Minecart.cpp
index b8e8e9f29..7f32dc910 100644
--- a/src/Entities/Minecart.cpp
+++ b/src/Entities/Minecart.cpp
@@ -1222,7 +1222,7 @@ void cMinecartWithChest::OnRightClicked(cPlayer & a_Player)
{
if (a_Player.GetWindow() != Window)
{
- a_Player.OpenWindow(Window);
+ a_Player.OpenWindow(*Window);
}
}
}
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index c0a078bcb..b11c07a0b 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -1310,15 +1310,15 @@ cTeam * cPlayer::UpdateTeam(void)
-void cPlayer::OpenWindow(cWindow * a_Window)
+void cPlayer::OpenWindow(cWindow & a_Window)
{
- if (a_Window != m_CurrentWindow)
+ if (&a_Window != m_CurrentWindow)
{
CloseWindow(false);
}
- a_Window->OpenedByPlayer(*this);
- m_CurrentWindow = a_Window;
- a_Window->SendWholeWindow(*GetClientHandle());
+ a_Window.OpenedByPlayer(*this);
+ m_CurrentWindow = &a_Window;
+ a_Window.SendWholeWindow(*GetClientHandle());
}
diff --git a/src/Entities/Player.h b/src/Entities/Player.h
index d25432e9f..dc8f07823 100644
--- a/src/Entities/Player.h
+++ b/src/Entities/Player.h
@@ -229,7 +229,7 @@ public:
// tolua_begin
/** Opens the specified window; closes the current one first using CloseWindow() */
- void OpenWindow(cWindow * a_Window);
+ void OpenWindow(cWindow & a_Window);
/** Closes the current window, resets current window to m_InventoryWindow. A plugin may refuse the closing if a_CanRefuse is true */
void CloseWindow(bool a_CanRefuse = true);