summaryrefslogtreecommitdiffstats
path: root/src/Entities/Pawn.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-09-30 19:54:55 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-10-01 14:16:17 +0200
commit452607860c3d60daf04c197c371c925e38864d54 (patch)
treef962b48c290e57634325ebb919b8b53707765d8f /src/Entities/Pawn.cpp
parentFix boats in the new physics system (diff)
downloadcuberite-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.cpp6
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;
}