"We all march togeather" NPC fix
Ever noticed that all the NPCs on the shard ten to walk in lock step? This is especially noticable with vendors that were all spawned at the same time and are not respawned on a regular basis. There is a simple little fix for this that I think should make it into the next release.
in BaseAI.cs the line
[code:1]
public AITimer( BaseAI owner ) : base( TimeSpan.FromSeconds( Utility.RandomDouble()), TimeSpan.FromSeconds( Math.Max( 0.0, owner.m_Mobile.CurrentSpeed ) ) )
[/code:1]
should be changed to
[code:1]
public AITimer( BaseAI owner ) : base( TimeSpan.FromSeconds( Utility.RandomDouble()*owner.m_Mobile.CurrentSpeed ), TimeSpan.FromSeconds( Math.Max( 0.0, owner.m_Mobile.CurrentSpeed ) ) )
[/code:1]
This causes the NPC startups to be spread out over a much longer period, making the lockstep behavior almost dissapear.
Ever noticed that all the NPCs on the shard ten to walk in lock step? This is especially noticable with vendors that were all spawned at the same time and are not respawned on a regular basis. There is a simple little fix for this that I think should make it into the next release.
in BaseAI.cs the line
[code:1]
public AITimer( BaseAI owner ) : base( TimeSpan.FromSeconds( Utility.RandomDouble()), TimeSpan.FromSeconds( Math.Max( 0.0, owner.m_Mobile.CurrentSpeed ) ) )
[/code:1]
should be changed to
[code:1]
public AITimer( BaseAI owner ) : base( TimeSpan.FromSeconds( Utility.RandomDouble()*owner.m_Mobile.CurrentSpeed ), TimeSpan.FromSeconds( Math.Max( 0.0, owner.m_Mobile.CurrentSpeed ) ) )
[/code:1]
This causes the NPC startups to be spread out over a much longer period, making the lockstep behavior almost dissapear.