Did what xoft said
This commit is contained in:
parent
1c1832b6ce
commit
e9c1d1ea9c
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include "Chicken.h"
|
#include "Chicken.h"
|
||||||
#include "../World.h"
|
#include "../World.h"
|
||||||
#include "../Entities/Player.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "Mooshroom.h"
|
#include "Mooshroom.h"
|
||||||
#include "../Entities/Player.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ void cPassiveMonster::Tick(float a_Dt, cChunk & a_Chunk)
|
|||||||
cPlayer * a_Closest_Player = m_World->FindClosestPlayer(GetPosition(), (float)m_SightDistance);
|
cPlayer * a_Closest_Player = m_World->FindClosestPlayer(GetPosition(), (float)m_SightDistance);
|
||||||
if (a_Closest_Player != NULL)
|
if (a_Closest_Player != NULL)
|
||||||
{
|
{
|
||||||
if (a_Closest_Player->GetEquippedItem().m_ItemType == FollowedItem.m_ItemType)
|
if (a_Closest_Player->GetEquippedItem().IsEqual(FollowedItem))
|
||||||
{
|
{
|
||||||
Vector3d PlayerPos = a_Closest_Player->GetPosition();
|
Vector3d PlayerPos = a_Closest_Player->GetPosition();
|
||||||
MoveToPosition(PlayerPos);
|
MoveToPosition(PlayerPos);
|
||||||
|
@ -19,7 +19,8 @@ public:
|
|||||||
|
|
||||||
/// When hit by someone, run away
|
/// When hit by someone, run away
|
||||||
virtual void DoTakeDamage(TakeDamageInfo & a_TDI) override;
|
virtual void DoTakeDamage(TakeDamageInfo & a_TDI) override;
|
||||||
|
/** Returns the item that the animal of this class follows when a player holds it in hand
|
||||||
|
Return an empty item not to follow (default). */
|
||||||
virtual const cItem GetFollowedItem(void) const { return cItem(); }
|
virtual const cItem GetFollowedItem(void) const { return cItem(); }
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
Loading…
Reference in New Issue
Block a user