Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-12-2003, 01:29 AM
Scorpious2k's Avatar
Scorpious2k
Demi-God
 
Join Date: Mar 2003
Location: USA
Posts: 1,067
Default NPC Grid Pause Bug

There is a bug in 4.4 that will cause roaming NPCs, moving along a grid to stop at a waypoint. Here is the fix we have put in at the Scorpious2k server.

The problem is in MovAI.CPP. In Mob::AI_Process() you find the following performed almost immediately on entry:

Code:
	if (AIwalking_timer->Check())
	{
		timercompleted=true;
		AIwalking_timer->Disable();
	}
the timer is disabled and the LOCAL variable timercompleted is set to true to indicate that the pause time is up and it is time for the mob to move.

The problem is that, because of other considerations, it may not get to the part of the function that gets the new waypoint, resets the timer to the new pause time and starts moving it.

The next time (and subsequent times) it will find the timer disabled and the local variable reset... so the mob will no longer move.

I considered several possible solutions to this problem. The timer does have to be disabled so that can't be removed. Finally I came up with this:

Find the line

Code:
			else if (roamer) 
		              {
and add the line
AIwalking_timer->Enable();

so it looks like this

Code:
	else if (roamer) 
	{
	    AIwalking_timer->Enable();
that will re-enable the timer and let the process continue. So far, this has worked perfectly for us (been testing it for 2 days so it may not be perfect).

I hope this helps.[/i][/b]
__________________
Maybe I should try making one of these servers...
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 08:37 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3