diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2022-07-11 00:56:25 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2022-07-19 23:33:09 +0200 |
commit | 284f54ed81186d3122b994db7395e870703efb4f (patch) | |
tree | 51a4b5c4a7e9fdde460c84117ea8f9ea6ed97393 /src/Mobs/Monster.cpp | |
parent | Move LineBlockTracer into Physics (diff) | |
download | cuberite-Megumin.tar cuberite-Megumin.tar.gz cuberite-Megumin.tar.bz2 cuberite-Megumin.tar.lz cuberite-Megumin.tar.xz cuberite-Megumin.tar.zst cuberite-Megumin.zip |
Diffstat (limited to 'src/Mobs/Monster.cpp')
-rw-r--r-- | src/Mobs/Monster.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp index 8e0d3a179..54b7319a4 100644 --- a/src/Mobs/Monster.cpp +++ b/src/Mobs/Monster.cpp @@ -2,7 +2,7 @@ #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules #include "IncludeAllMonsters.h" -#include "LineBlockTracer.h" +#include "Physics/Tracers/LineBlockTracer.h" #include "../BlockInfo.h" #include "../Root.h" #include "../Server.h" @@ -754,7 +754,7 @@ void cMonster::CheckEventSeePlayer(cChunk & a_Chunk) // TODO: Currently all mobs see through lava, but only Nether-native mobs should be able to. if ( (TargetDistance < ClosestDistance) && - cLineBlockTracer::LineOfSightTrace(*GetWorld(), MyHeadPosition, TargetHeadPosition, cLineBlockTracer::losAirWaterLava) + LineBlockTracer::LineOfSightTrace(*GetWorld(), MyHeadPosition, TargetHeadPosition, LineBlockTracer::LineOfSight::AirWaterLava) ) { TargetPlayer = &a_Player; @@ -800,7 +800,7 @@ void cMonster::CheckEventLostPlayer(const std::chrono::milliseconds a_Dt) const auto MyHeadPosition = GetPosition().addedY(GetHeight()); const auto TargetHeadPosition = Target->GetPosition().addedY(Target->GetHeight()); - if (!cLineBlockTracer::LineOfSightTrace(*GetWorld(), MyHeadPosition, TargetHeadPosition, cLineBlockTracer::losAirWaterLava)) + if (!LineBlockTracer::LineOfSightTrace(*GetWorld(), MyHeadPosition, TargetHeadPosition, LineBlockTracer::LineOfSight::AirWaterLava)) { if ((m_LoseSightAbandonTargetTimer += a_Dt) > std::chrono::seconds(4)) { |