clientSuspend not supend?

This place is for Closed bug reports only. NOT for asking help!

Moderators: Moderators, Developers

Message
Author
DInvalid
Noob
Noob
Posts: 2
Joined: 22 Jun 2008, 05:23
Noob?: No

clientSuspend not supend?

#1 Post by DInvalid »

Hi.

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;
}
It suspend AI if and only if $net->clientAlive() == true?
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'});
I suppose we must add some code to 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;
	} elsif (AI::action eq "clientSuspend") { 
		$result = 1;
	}
	return $result;
}

Thx.

User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: clientSuspend not supend?

#2 Post by kLabMouse »

Accepted in r7528

Post Reply