1
0
Fork 0

neutral mobs shouldn't chase the player unless aggro'd

code style

neutral mobs shouldn't chase the player unless aggro'd

neutral mobs shouldn't chase the player unless aggro'd

Merge branch 'chilloutyo' of github.com:Gargaj/cuberite into chilloutyo

Conflicts:
	src/Mobs/PassiveAggressiveMonster.h

code style

Merge branch 'chilloutyo' of github.com:Gargaj/cuberite into chilloutyo
This commit is contained in:
Gargaj 2015-11-08 20:53:32 +01:00
parent cfbb7360cd
commit 97ddcc1c0a
3 changed files with 8 additions and 1 deletions

View File

@ -126,7 +126,7 @@ void cEnderman::CheckEventSeePlayer()
if (!Callback.GetPlayer()->IsGameModeCreative())
{
super::EventSeePlayer(Callback.GetPlayer());
cMonster::EventSeePlayer(Callback.GetPlayer());
m_EMState = CHASING;
m_bIsScreaming = true;
GetWorld()->BroadcastEntityMetadata(*this);

View File

@ -39,3 +39,9 @@ bool cPassiveAggressiveMonster::DoTakeDamage(TakeDamageInfo & a_TDI)
void cPassiveAggressiveMonster::EventSeePlayer(cEntity *)
{
// don't do anything, neutral mobs don't react to just seeing the player
}

View File

@ -16,6 +16,7 @@ public:
cPassiveAggressiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, double a_Width, double a_Height);
virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) override;
virtual void EventSeePlayer(cEntity *) override;
} ;