Merge pull request #1010 from EQEmu/feared_proximity

Added proximity check for feared clients
This commit is contained in:
Chris Miles 2020-04-03 03:22:29 -05:00 committed by GitHub
commit cfcbfea3ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -161,6 +161,7 @@ RULE_BOOL(Character, DismountWater, true, "Dismount horses when entering water")
RULE_BOOL(Character, UseNoJunkFishing, false, "Disregards junk items when fishing")
RULE_BOOL(Character, SoftDeletes, true, "When characters are deleted in character select, they are only soft deleted")
RULE_INT(Character, DefaultGuild, 0, "If not 0, new characters placed into the guild # indicated")
RULE_BOOL(Character, ProcessFearedProximity, false, "Processes proximity checks when feared")
RULE_CATEGORY_END()
RULE_CATEGORY(Mercs)

View File

@ -747,6 +747,13 @@ void Client::AI_Process()
RunTo(m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z);
}
}
if (RuleB(Character, ProcessFearedProximity) && proximity_timer.Check()) {
entity_list.ProcessMove(this, glm::vec3(GetX(), GetY(), GetZ()));
if (RuleB(TaskSystem, EnableTaskSystem) && RuleB(TaskSystem, EnableTaskProximity))
ProcessTaskProximities(GetX(), GetY(), GetZ());
m_Proximity = glm::vec3(GetX(), GetY(), GetZ());
}
return;
}