Don't destroy monster when last target type is a player (#3721)
In current Cuberite version if you are pursued by monsters you just have to disconnect and connect again to get rid of them. If no other player is in your chunk monsters will get destroyed.
This commit is contained in:
@@ -1149,8 +1149,8 @@ void cWorld::TickMobs(std::chrono::milliseconds a_Dt)
|
||||
{
|
||||
Monster->Tick(m_Dt, *(a_Entity->GetParentChunk()));
|
||||
}
|
||||
// Destroy far hostile mobs
|
||||
else if ((Monster->GetMobFamily() == cMonster::eFamily::mfHostile))
|
||||
// Destroy far hostile mobs except if last target was a player
|
||||
else if ((Monster->GetMobFamily() == cMonster::eFamily::mfHostile) && !Monster->WasLastTargetAPlayer())
|
||||
{
|
||||
if (Monster->GetMobType() != eMonsterType::mtWolf)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user