diff options
author | peterbell10 <peterbell10@live.co.uk> | 2018-05-02 09:50:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-02 09:50:36 +0200 |
commit | a4dbb5c58270959884c17d720185da06464fa256 (patch) | |
tree | 2b4e81410e90e059f51726e6c9a01c03fcbfb98d /src/Entities/Player.cpp | |
parent | tolua++ bindings use nullptr. (#4219) (diff) | |
download | cuberite-a4dbb5c58270959884c17d720185da06464fa256.tar cuberite-a4dbb5c58270959884c17d720185da06464fa256.tar.gz cuberite-a4dbb5c58270959884c17d720185da06464fa256.tar.bz2 cuberite-a4dbb5c58270959884c17d720185da06464fa256.tar.lz cuberite-a4dbb5c58270959884c17d720185da06464fa256.tar.xz cuberite-a4dbb5c58270959884c17d720185da06464fa256.tar.zst cuberite-a4dbb5c58270959884c17d720185da06464fa256.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/Player.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index a58d45fb0..c674f4620 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -968,7 +968,7 @@ bool cPlayer::DoTakeDamage(TakeDamageInfo & a_TDI) if ((a_TDI.Attacker != nullptr) && (a_TDI.Attacker->IsPlayer())) { - cPlayer * Attacker = reinterpret_cast<cPlayer *>(a_TDI.Attacker); + cPlayer * Attacker = static_cast<cPlayer *>(a_TDI.Attacker); if ((m_Team != nullptr) && (m_Team == Attacker->m_Team)) { @@ -1098,7 +1098,7 @@ void cPlayer::KilledBy(TakeDamageInfo & a_TDI) } else if (a_TDI.Attacker->IsPlayer()) { - cPlayer * Killer = reinterpret_cast<cPlayer *>(a_TDI.Attacker); + cPlayer * Killer = static_cast<cPlayer *>(a_TDI.Attacker); AString DeathMessage = Printf("%s was killed by %s", GetName().c_str(), Killer->GetName().c_str()); PluginManager->CallHookKilled(*this, a_TDI, DeathMessage); if (DeathMessage != AString("")) @@ -1139,7 +1139,7 @@ void cPlayer::Killed(cEntity * a_Victim) } else if (a_Victim->IsMob()) { - if (reinterpret_cast<cMonster *>(a_Victim)->GetMobFamily() == cMonster::mfHostile) + if (static_cast<cMonster *>(a_Victim)->GetMobFamily() == cMonster::mfHostile) { AwardAchievement(achKillMonster); } @@ -2529,7 +2529,7 @@ void cPlayer::UpdateMovementStats(const Vector3d & a_DeltaPos, bool a_PreviousIs case cEntity::etBoat: m_Stats.AddValue(statDistBoat, Value); break; case cEntity::etMonster: { - cMonster * Monster = reinterpret_cast<cMonster *>(m_AttachedTo); + cMonster * Monster = static_cast<cMonster *>(m_AttachedTo); switch (Monster->GetMobType()) { case mtPig: m_Stats.AddValue(statDistPig, Value); break; |