Why AI doesnt synchronized?

2 views
Skip to first unread message

FASM

unread,
Jan 7, 2011, 8:54:14 AM1/7/11
to aionj-hungary
Hi,

Obviously Ai instances are mutable but there is no any synchronization
at all.
For ex:
public void setAiState(AIState aiState)
{
if(this.aiState != aiState)
{
this.aiState = aiState;
isStateChanged = true;
}
}
setAiState can be accessed from several threads at same time and
aiState not atomic and moreover if-changed-set clause not synchronized
and more over aiState and isStateChanged r not volatile.

So Mr.Poke or someone can explain me why it was implemented this why?

Thanks in advance.

Mr. Poke

unread,
Jan 7, 2011, 10:32:26 AM1/7/11
to aionj-hungary
Hi!

synchronized void changeIntention(CtrlIntention intention, Creature
arg0, Creature arg1)

This is syncronized ;)

Mr. Poke

unread,
Jan 7, 2011, 10:33:38 AM1/7/11
to aionj-hungary
And where found this?

I delete all old AI file.

On jan. 7, 14:54, FASM <vyas...@gmail.com> wrote:

FASM

unread,
Jan 7, 2011, 11:09:32 AM1/7/11
to aionj-hungary
Oh sorry, i thought this proj has same AI impl as in aion-unique :)
Reply all
Reply to author
Forward
0 new messages