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:
parent
cfbb7360cd
commit
97ddcc1c0a
@ -126,7 +126,7 @@ void cEnderman::CheckEventSeePlayer()
|
|||||||
|
|
||||||
if (!Callback.GetPlayer()->IsGameModeCreative())
|
if (!Callback.GetPlayer()->IsGameModeCreative())
|
||||||
{
|
{
|
||||||
super::EventSeePlayer(Callback.GetPlayer());
|
cMonster::EventSeePlayer(Callback.GetPlayer());
|
||||||
m_EMState = CHASING;
|
m_EMState = CHASING;
|
||||||
m_bIsScreaming = true;
|
m_bIsScreaming = true;
|
||||||
GetWorld()->BroadcastEntityMetadata(*this);
|
GetWorld()->BroadcastEntityMetadata(*this);
|
||||||
|
@ -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
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -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);
|
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 bool DoTakeDamage(TakeDamageInfo & a_TDI) override;
|
||||||
|
virtual void EventSeePlayer(cEntity *) override;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user