diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-09-30 19:54:55 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-10-01 14:16:17 +0200 |
commit | 452607860c3d60daf04c197c371c925e38864d54 (patch) | |
tree | f962b48c290e57634325ebb919b8b53707765d8f /src/Entities/Pawn.cpp | |
parent | Fix boats in the new physics system (diff) | |
download | cuberite-452607860c3d60daf04c197c371c925e38864d54.tar cuberite-452607860c3d60daf04c197c371c925e38864d54.tar.gz cuberite-452607860c3d60daf04c197c371c925e38864d54.tar.bz2 cuberite-452607860c3d60daf04c197c371c925e38864d54.tar.lz cuberite-452607860c3d60daf04c197c371c925e38864d54.tar.xz cuberite-452607860c3d60daf04c197c371c925e38864d54.tar.zst cuberite-452607860c3d60daf04c197c371c925e38864d54.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/Pawn.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Entities/Pawn.cpp b/src/Entities/Pawn.cpp index 9857fa29c..3a8ef8cdf 100644 --- a/src/Entities/Pawn.cpp +++ b/src/Entities/Pawn.cpp @@ -82,11 +82,11 @@ void cPawn::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) } // Spectators cannot push entities around - if ((!IsPlayer()) || (!static_cast<cPlayer *>(this)->IsGameModeSpectator())) + if (!IsPlayer() || (!static_cast<cPlayer *>(this)->IsGameModeSpectator())) { - m_World->ForEachEntityInBox(GetBoundingBox(), [=](cEntity & a_Entity) + m_World->ForEachEntityInBox(GetBoundingBox(), [this](cEntity & a_Entity) { - if (a_Entity.GetUniqueID() == GetUniqueID()) + if (&a_Entity == this) { return false; } |