1
0
Fork 0

Did what xoft said

This commit is contained in:
tonibm19 2014-01-29 20:02:41 +01:00
parent 1c1832b6ce
commit e9c1d1ea9c
4 changed files with 3 additions and 5 deletions

View File

@ -2,7 +2,6 @@
#include "Chicken.h"
#include "../World.h"
#include "../Entities/Player.h"

View File

@ -2,8 +2,6 @@
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
#include "Mooshroom.h"
#include "../Entities/Player.h"

View File

@ -47,7 +47,7 @@ void cPassiveMonster::Tick(float a_Dt, cChunk & a_Chunk)
cPlayer * a_Closest_Player = m_World->FindClosestPlayer(GetPosition(), (float)m_SightDistance);
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();
MoveToPosition(PlayerPos);

View File

@ -19,7 +19,8 @@ public:
/// When hit by someone, run away
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(); }
} ;