Monster's lag/skip

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
Sinnocent
Posts: 37
Joined: Tue Sep 08, 2015 8:42 am

Monster's lag/skip

Post by Sinnocent »

After using ranged debuffs such as Curse Gloom and Dark Vortex(havent really tested other skills) but if you use these skills first on a mob as a FIRST skill a lot of the time the monster will bug out and start lagging/skipping toward you in a strange motion... I can't figure whats causing this..
Sinnocent
Posts: 37
Joined: Tue Sep 08, 2015 8:42 am

Re: Monster's lag/skip

Post by Sinnocent »

Here is a short video showing the problems(see 1st and last mob that I attack). Any one have a solution too fix this annoying lag? Monsters are lagging similar too this with Melee attackers also, not as much but it happens..

https://youtu.be/a2M9YZwIgpA
sahar
Posts: 582
Joined: Mon Jun 20, 2011 2:40 pm
Contact:

Re: Monster's lag/skip

Post by sahar »

It happens also on latest develop branch and the situation you mentioned is not the only case it is happening.
Nik
L2j Veteran
L2j Veteran
Posts: 629
Joined: Fri Apr 18, 2008 9:09 pm

Re: Monster's lag/skip

Post by Nik »

It sends MoveToPawn packet when it shouldn't. Check in AbstractAI describeStateToPlayer or idk what the method is, i can't check since... you know, no github.
Playing a game where you know how every single mechanism works is quite satisfying.
Its the main perk that a gamer-developer has :D
sahar
Posts: 582
Joined: Mon Jun 20, 2011 2:40 pm
Contact:

Re: Monster's lag/skip

Post by sahar »

I don't remmember having this problem when I had my server running, yet I compare l2jmaster from November and latest Develop and I don't seem to find any difference that may cause this, maybe this existed even before? O_O

It looks like:

Code: Select all

	/**
	 * Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the L2PcInstance player.<br>
	 * <FONT COLOR=#FF0000><B> <U>Caution</U> : Low level function, used by AI subclasses</B></FONT>
	 * @param player The L2PcIstance to notify with state of this L2Character
	 */
	public void describeStateToPlayer(L2PcInstance player)
	{
		if (getActor().isVisibleFor(player))
		{
			if (_clientMoving)
			{
				if ((_clientMovingToPawnOffset != 0) && (_followTarget != null))
				{
					// Send a Server->Client packet MoveToPawn to the actor and all L2PcInstance in its _knownPlayers
					player.sendPacket(new MoveToPawn(_actor, _followTarget, _clientMovingToPawnOffset));
				}
				else
				{
					// Send a Server->Client packet CharMoveToLocation to the actor and all L2PcInstance in its _knownPlayers
					player.sendPacket(new MoveToLocation(_actor));
				}
			}
		}
	}
Nik
L2j Veteran
L2j Veteran
Posts: 629
Joined: Fri Apr 18, 2008 9:09 pm

Re: Monster's lag/skip

Post by Nik »

Most likely _clientMoving is true, when it shouldn't. OR maybe it is false when it should be true. It needs some debugging though.
Playing a game where you know how every single mechanism works is quite satisfying.
Its the main perk that a gamer-developer has :D
sahar
Posts: 582
Joined: Mon Jun 20, 2011 2:40 pm
Contact:

Re: Monster's lag/skip

Post by sahar »

I don't think its that actually.
I checked some more cases, in my server I got mobs that are set isChaos="true" to be able to attack each other based on mob clan.
Basically it works but the animations are completely fucked up, sometimes you might see mobs jumping towards each other (instead of moving) and then just standing in front of each other doing nothing, but they are actually attacking (you can see HPs going down) dafuq...
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: Monster's lag/skip

Post by UnAfraid »

wasn't isChaos for target reconsideration (Making monster not able to be controlled by Tanks)?
Image
sahar
Posts: 582
Joined: Mon Jun 20, 2011 2:40 pm
Contact:

Re: Monster's lag/skip

Post by sahar »

Nope, I think that's isConfused(), isChaos() is used by NPCs to deteminate if they can attack and damage other mobs based on clan.

Code: Select all

if (target instanceof L2Attackable)
{
	if (!target.isAutoAttackable(me))
	{
		return false;
	}
	
	if (me.isChaos() && me.isInsideRadius(target, me.getAggroRange(), false, false))
	{
		if (((L2Attackable) target).isInMyClan(me))
		{
			return false;
		}
		// Los Check
		return GeoData.getInstance().canSeeTarget(me, target);
	}
}
HorridoJoho
L2j Senior Developer
L2j Senior Developer
Posts: 795
Joined: Sun Aug 14, 2005 11:27 am

Re: Monster's lag/skip

Post by HorridoJoho »

UnAfraid wrote:wasn't isChaos for target reconsideration (Making monster not able to be controlled by Tanks)?
This. isChaos means it randomly attack enemies when aggroed.
sahar wrote:Nope, I think that's isConfused(), isChaos() is used by NPCs to deteminate if they can attack and damage other mobs based on clan.

Code: Select all

if (target instanceof L2Attackable)
{
	if (!target.isAutoAttackable(me))
	{
		return false;
	}
	
	if (me.isChaos() && me.isInsideRadius(target, me.getAggroRange(), false, false))
	{
		if (((L2Attackable) target).isInMyClan(me))
		{
			return false;
		}
		// Los Check
		return GeoData.getInstance().canSeeTarget(me, target);
	}
}
No. There is a difference between isChaos and isConfused. isChaos just means randomly attack any enemy while isConfused means randomly attack any creature, not only enemies.

That is what i remember, and it would also make more sense.
sahar
Posts: 582
Joined: Mon Jun 20, 2011 2:40 pm
Contact:

Re: Monster's lag/skip

Post by sahar »

Its not randomly attack any enemy, its enemies which are not in the same clan, and that's what I meant.
Anyway this is not the subject here.
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: Monster's lag/skip

Post by UnAfraid »

sahar wrote:Its not randomly attack any enemy, its enemies which are not in the same clan, and that's what I meant.
Anyway this is not the subject here.
Exactly as i said, isChaos which has that true are not controllable by tanks they constantly change target and attacking at random some target.
isConfused is different thing, it can be true only if monster is under such effect while isChaos is constant.
Image
sahar
Posts: 582
Joined: Mon Jun 20, 2011 2:40 pm
Contact:

Re: Monster's lag/skip

Post by sahar »

Anyway it achieves the goal I want, but still, it doesnt change the fact that animations are completely broken for both movement and attack.
Post Reply