Hello!
Is there a way to lower the time needed to engage a new target after killing one?
Lowering the engage time after mob's death
Re: Lowering the engage time after mob's death
Isn't that client side enforced? I'm not finding anything in the project about any delay..
-- Whasf
Re: Lowering the engage time after mob's death
Look in src->map->ai->controllers->player_controller.cpp
Find this:
And alter it to take away the delay:
Find this:
Code: Select all
if (distance(PChar->loc.p, PTarget->loc.p) < 30)
{
if (m_LastAttackTime + std::chrono::milliseconds(PChar->GetWeaponDelay(false)) < server_clock::now())
{
if (CController::Engage(targid))
{
PChar->PLatentEffectContainer->CheckLatentsWeaponDraw(true);
PChar->pushPacket(new CLockOnPacket(PChar, PTarget));
return true;
}
}
else
{
errMsg = std::make_unique<CMessageBasicPacket>(PChar, PTarget, 0, 0, MSGBASIC_WAIT_LONGER);
}
}
Code: Select all
if (distance(PChar->loc.p, PTarget->loc.p) < 30)
{
if (m_LastAttackTime < server_clock::now()) //TAKE AWAY THE + std::chrono::milliseconds(PChar->GetWeaponDelay(false))
{
if (CController::Engage(targid))
{
PChar->PLatentEffectContainer->CheckLatentsWeaponDraw(true);
PChar->pushPacket(new CLockOnPacket(PChar, PTarget));
return true;
}
}
else
{
errMsg = std::make_unique<CMessageBasicPacket>(PChar, PTarget, 0, 0, MSGBASIC_WAIT_LONGER);
}
}
else
{
errMsg = std::make_unique<CMessageBasicPacket>(PChar, PTarget, 0, 0, MSGBASIC_TOO_FAR_AWAY);
}