Let's look at CoreLogic processClientSuspend:
Code: Select all
##### CLIENT SUSPEND #####
# The clientSuspend AI sequence is used to freeze all other AI activity
# for a certain period of time.
sub processClientSuspend {
my $result = 0;
if (AI::action eq 'clientSuspend' && timeOut(AI::args)) {
warning " client suspend end\n";
debug "AI suspend by clientSuspend dequeued\n";
AI::dequeue;
} elsif (AI::action eq "clientSuspend" && $net->clientAlive()) {
...some code...
# Client suspended, do not continue with AI
$result = 1;
}
return $result;
}
But does it works this way?
Code: Select all
# Cheap way to suspend all movement to make it look real
ai_clientSuspend(0, $timeout{'ai_attack_waitAfterKill'}{'timeout'});
Code: Select all
##### CLIENT SUSPEND #####
# The clientSuspend AI sequence is used to freeze all other AI activity
# for a certain period of time.
sub processClientSuspend {
my $result = 0;
if (AI::action eq 'clientSuspend' && timeOut(AI::args)) {
warning " client suspend end\n";
debug "AI suspend by clientSuspend dequeued\n";
AI::dequeue;
} elsif (AI::action eq "clientSuspend" && $net->clientAlive()) {
...some code...
# Client suspended, do not continue with AI
$result = 1;
} elsif (AI::action eq "clientSuspend") {
$result = 1;
}
return $result;
}
Thx.