parent
38aeaa64ed
commit
f1be1eb674
@ -1 +1 @@
|
||||
Subproject commit 784b04ff9afd5faeaeb15c3fa159ff98adf55182
|
||||
Subproject commit 1ed82759c68f92c4acc7e3f33b850cf9f01c8aba
|
@ -496,9 +496,6 @@ void cBlockInfo::Initialize(cBlockInfoArray & a_Info)
|
||||
a_Info[E_BLOCK_CROPS ].m_IsSolid = false;
|
||||
a_Info[E_BLOCK_DANDELION ].m_IsSolid = false;
|
||||
a_Info[E_BLOCK_DETECTOR_RAIL ].m_IsSolid = false;
|
||||
a_Info[E_BLOCK_END_PORTAL ].m_IsSolid = false;
|
||||
a_Info[E_BLOCK_FENCE ].m_IsSolid = false;
|
||||
a_Info[E_BLOCK_FENCE_GATE ].m_IsSolid = false;
|
||||
a_Info[E_BLOCK_FIRE ].m_IsSolid = false;
|
||||
a_Info[E_BLOCK_FLOWER ].m_IsSolid = false;
|
||||
a_Info[E_BLOCK_HEAVY_WEIGHTED_PRESSURE_PLATE].m_IsSolid = false;
|
||||
@ -530,7 +527,6 @@ void cBlockInfo::Initialize(cBlockInfoArray & a_Info)
|
||||
a_Info[E_BLOCK_WATER ].m_IsSolid = false;
|
||||
a_Info[E_BLOCK_WOODEN_BUTTON ].m_IsSolid = false;
|
||||
a_Info[E_BLOCK_WOODEN_PRESSURE_PLATE].m_IsSolid = false;
|
||||
a_Info[E_BLOCK_WOODEN_SLAB ].m_IsSolid = false;
|
||||
|
||||
|
||||
// Blocks that fully occupy their voxel - used as a guide for torch placeable blocks, amongst other things:
|
||||
|
@ -115,8 +115,6 @@ void cMonster::TickPathFinding()
|
||||
const int PosY = POSY_TOINT;
|
||||
const int PosZ = POSZ_TOINT;
|
||||
|
||||
m_FinalDestination.y = (double)FindFirstNonAirBlockPosition(m_FinalDestination.x, m_FinalDestination.z);
|
||||
|
||||
std::vector<Vector3d> m_PotentialCoordinates;
|
||||
m_TraversedCoordinates.push_back(Vector3i(PosX, PosY, PosZ));
|
||||
|
||||
@ -201,19 +199,6 @@ void cMonster::TickPathFinding()
|
||||
|
||||
|
||||
|
||||
void cMonster::MoveToPosition(const Vector3f & a_Position)
|
||||
{
|
||||
FinishPathFinding();
|
||||
|
||||
m_FinalDestination = a_Position;
|
||||
m_bMovingToDestination = true;
|
||||
TickPathFinding();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void cMonster::MoveToPosition(const Vector3d & a_Position)
|
||||
{
|
||||
FinishPathFinding();
|
||||
@ -227,15 +212,7 @@ void cMonster::MoveToPosition(const Vector3d & a_Position)
|
||||
|
||||
bool cMonster::IsCoordinateInTraversedList(Vector3i a_Coords)
|
||||
{
|
||||
for (std::vector<Vector3i>::const_iterator itr = m_TraversedCoordinates.begin(); itr != m_TraversedCoordinates.end(); ++itr)
|
||||
{
|
||||
if (itr->Equals(a_Coords))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return (std::find(m_TraversedCoordinates.begin(), m_TraversedCoordinates.end(), a_Coords) != m_TraversedCoordinates.end());
|
||||
}
|
||||
|
||||
|
||||
@ -296,8 +273,6 @@ void cMonster::Tick(float a_Dt, cChunk & a_Chunk)
|
||||
{
|
||||
if (m_bOnGround)
|
||||
{
|
||||
m_Destination.y = FindFirstNonAirBlockPosition(m_Destination.x, m_Destination.z);
|
||||
|
||||
if (DoesPosYRequireJump((int)floor(m_Destination.y)))
|
||||
{
|
||||
m_bOnGround = false;
|
||||
|
@ -92,7 +92,6 @@ public:
|
||||
|
||||
virtual void KilledBy(TakeDamageInfo & a_TDI) override;
|
||||
|
||||
virtual void MoveToPosition(const Vector3f & a_Position);
|
||||
virtual void MoveToPosition(const Vector3d & a_Position); // tolua_export
|
||||
virtual bool ReachedDestination(void);
|
||||
|
||||
|
@ -48,7 +48,7 @@ void cSkeleton::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||
|
||||
|
||||
|
||||
void cSkeleton::MoveToPosition(const Vector3f & a_Position)
|
||||
void cSkeleton::MoveToPosition(const Vector3d & a_Position)
|
||||
{
|
||||
// If the destination is sufficiently skylight challenged AND the skeleton isn't on fire then block the movement
|
||||
if (
|
||||
|
@ -18,7 +18,7 @@ public:
|
||||
CLASS_PROTODEF(cSkeleton);
|
||||
|
||||
virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override;
|
||||
virtual void MoveToPosition(const Vector3f & a_Position) override;
|
||||
virtual void MoveToPosition(const Vector3d & a_Position) override;
|
||||
virtual void Attack(float a_Dt) override;
|
||||
virtual void SpawnOn(cClientHandle & a_ClientHandle) override;
|
||||
|
||||
|
@ -42,7 +42,7 @@ void cZombie::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||
|
||||
|
||||
|
||||
void cZombie::MoveToPosition(const Vector3f & a_Position)
|
||||
void cZombie::MoveToPosition(const Vector3d & a_Position)
|
||||
{
|
||||
// If the destination is sufficiently skylight challenged AND the skeleton isn't on fire then block the movement
|
||||
if (
|
||||
|
@ -17,7 +17,7 @@ public:
|
||||
CLASS_PROTODEF(cZombie);
|
||||
|
||||
virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override;
|
||||
virtual void MoveToPosition(const Vector3f & a_Position) override;
|
||||
virtual void MoveToPosition(const Vector3d & a_Position) override;
|
||||
|
||||
bool IsVillagerZombie(void) const {return m_IsVillagerZombie; }
|
||||
bool IsConverting (void) const {return m_IsConverting; }
|
||||
|
Loading…
Reference in New Issue
Block a user