diff options
author | HaoTNN <haotnn@gmail.com> | 2015-06-03 01:08:57 +0200 |
---|---|---|
committer | HaoTNN <haotnn@gmail.com> | 2015-06-03 01:08:57 +0200 |
commit | 3142598dee31acc23c738a1a728638665c8940b8 (patch) | |
tree | 2eb837ed785678d536d677ff5020fabca089f2e5 /src/Entities/ItemFrame.cpp | |
parent | Merge remote-tracking branch 'upstream/master' (diff) | |
parent | Merge pull request #2182 from birkett/master (diff) | |
download | cuberite-3142598dee31acc23c738a1a728638665c8940b8.tar cuberite-3142598dee31acc23c738a1a728638665c8940b8.tar.gz cuberite-3142598dee31acc23c738a1a728638665c8940b8.tar.bz2 cuberite-3142598dee31acc23c738a1a728638665c8940b8.tar.lz cuberite-3142598dee31acc23c738a1a728638665c8940b8.tar.xz cuberite-3142598dee31acc23c738a1a728638665c8940b8.tar.zst cuberite-3142598dee31acc23c738a1a728638665c8940b8.zip |
Diffstat (limited to 'src/Entities/ItemFrame.cpp')
-rw-r--r-- | src/Entities/ItemFrame.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Entities/ItemFrame.cpp b/src/Entities/ItemFrame.cpp index 4e6e38f1f..6317eba85 100644 --- a/src/Entities/ItemFrame.cpp +++ b/src/Entities/ItemFrame.cpp @@ -62,7 +62,7 @@ void cItemFrame::KilledBy(TakeDamageInfo & a_TDI) return; } - if ((a_TDI.Attacker != nullptr) && a_TDI.Attacker->IsPlayer() && !((cPlayer *)a_TDI.Attacker)->IsGameModeCreative()) + if ((a_TDI.Attacker != nullptr) && a_TDI.Attacker->IsPlayer() && !static_cast<cPlayer *>(a_TDI.Attacker)->IsGameModeCreative()) { cItems Item; Item.push_back(m_Item); @@ -83,7 +83,7 @@ void cItemFrame::KilledBy(TakeDamageInfo & a_TDI) void cItemFrame::GetDrops(cItems & a_Items, cEntity * a_Killer) { - if ((a_Killer != nullptr) && a_Killer->IsPlayer() && !((cPlayer *)a_Killer)->IsGameModeCreative()) + if ((a_Killer != nullptr) && a_Killer->IsPlayer() && !static_cast<cPlayer *>(a_Killer)->IsGameModeCreative()) { a_Items.push_back(cItem(E_ITEM_ITEM_FRAME)); } @@ -96,7 +96,7 @@ void cItemFrame::GetDrops(cItems & a_Items, cEntity * a_Killer) void cItemFrame::SpawnOn(cClientHandle & a_ClientHandle) { super::SpawnOn(a_ClientHandle); - a_ClientHandle.SendSpawnObject(*this, 71, GetProtocolFacing(), (Byte)GetYaw(), (Byte)GetPitch()); + a_ClientHandle.SendSpawnObject(*this, 71, GetProtocolFacing(), static_cast<Byte>(GetYaw()), static_cast<Byte>(GetPitch())); a_ClientHandle.SendEntityMetadata(*this); } |