Page 1 of 1

slow reactions

Posted: Thu Mar 24, 2011 9:34 pm
by WhiteTiger
So like, I suck at explaning stuff, but here's the problem:
I'm using a waypoint with type = "TRAVEL", and I usually run pass a lot of mobs, that slows me from time to time which is really annoying.
When I'm not in combat, my char turns smoothly and fast after each waypoint when going for the next one, but when I have mobs after me my char stops for like 1 sec each waypoint before moving to the next. 1 sec doesnt seem much but it's just enought to give the mobs time to catch up and slow me.
Is there any way to like tweak this to make my char react the same time in combat as outside combat? I don't use any skills for combat or pots or anything so maybe there's some code I can remove?

Re: slow reactions

Posted: Fri Mar 25, 2011 3:32 am
by rock5
I just did a bit of testing. For me it paused .2 to .25 seconds at every waypoint regardless of what was happening around it. It's because at the end of the moveto function it stops moving forward and doesn't start again until it does the next moveto which takes about .2 seconds.

I've tried having it not stop and it seems to work ok. Not sure if there are sutuations it might cause a problem or not.

To try it out, at the end of the moveto function in player.lua around line 1895 you'll see.

Code: Select all

	keyboardRelease( settings.hotkeys.MOVE_FORWARD.key );
	keyboardRelease( settings.hotkeys.ROTATE_LEFT.key );
	keyboardRelease( settings.hotkeys.ROTATE_RIGHT.key );
Comment out the first line.

Code: Select all

	--keyboardRelease( settings.hotkeys.MOVE_FORWARD.key );
	keyboardRelease( settings.hotkeys.ROTATE_LEFT.key );
	keyboardRelease( settings.hotkeys.ROTATE_RIGHT.key );
Because it doesn't stop you'll need to increase the success distance around line 1781,

Code: Select all

	local successDist = 20.0 -- Distance to consider successfully reaching the target location
	if self.Mounted then
		successDist = 30.0 -- so we don't overpass it and double back when mounted
	end
Add ten to both

Code: Select all

	local successDist = 30.0 -- Distance to consider successfully reaching the target location
	if self.Mounted then
		successDist = 40.0 -- so we don't overpass it and double back when mounted
	end
Try that out and let us know how it goes.

Re: slow reactions

Posted: Fri Mar 25, 2011 7:16 am
by WhiteTiger
Yeah this works awesomely :D thx

Will I get out of possition tho I if I get lag spikes? Like if the char just continues to move. Or will it be the same as before?

Re: slow reactions

Posted: Fri Mar 25, 2011 7:42 am
by rock5
You'll have to see, but wouldn't lag spikes be an issue even without this change? I don't see there would be any difference unless the lag happens during that .2 of a second when it would have been stopped.

Re: slow reactions

Posted: Fri Mar 25, 2011 9:04 am
by WhiteTiger
Yup I guess that's true, thx for the help !

Re: slow reactions

Posted: Mon Mar 28, 2011 9:19 pm
by rock5
I didn't add this fix in the last post because I was seeing that it affected other functions that use the moveTo function such as player:fight().

I've implemented a fix in the current revision (586) that only affects moveTo when reaching waypoints. So when running waypoints it will no longer pause and the changes will have no affect on other functions that use moveTo.

Enjoy.