When you see a monster far away, you can sellect it give the command to attack it. When you do that while running, your running movement stops, while you still move, attack music starts and the monster turns towards you aggressively, neglecting further all (nearer) other attackers. After all this, however your attack stance will be canceled because the target is too far away.
Wouldn\'t it be better if the validation was before all these changes, and canceled the attack beforehand?
I am a bit new to the planeshift code, but I think that in file combatmanager.cpp, function psCombatManager::HandleCombatEvent,
before calling
Client * attacker_client = psserver->GetNetManager()->GetClient(event->AttackerCID);
this could be placed
if ( !ValidateDistance(gemAttacker, gemTarget, weapon) )
{
psserver->SendSystemError(event->AttackerCID, \"You are too far away to attack.\" );
return;
}
or am I wrong?