Backwards walking desync

04/22/2020 10:02 FlyffDeveloper#1
EXAMPLE:


So basically I have this weird issue on the server related to characters walking backwards. The issue seem to happen when a client starts walking backwards and then releases the S key. The other clients will think the character is still walking backwards.

The server knows the character is not moving backwards anymore because when the original client does a new movement action. it will warp back to the real server location. So it looks very confusing and weird for other clients.

Anyone have any experience with this issue and have any leads for fixing it?

I've spent some time looking at the backwards moving in the code but I'm not super familar with movement code in FlyFF so just wanted to see if anyone here has an idea about it before I dig deeper.
04/22/2020 10:22 TheCrawler#2
Seems like your client your not emitting the "stop" motion to the server, and since the server is not getting it, it's not spreading this information aswell...
04/23/2020 08:56 FlyffDeveloper#3
Doing this in WndWorldControlPlayer (~line 435ish)

Seemed to help prevent the issue quite a lot (haven't seen it happen yet).
For those who have similar issues.

Code:
	if( bUp == FALSE || bDown == FALSE )
	{
		if( pMover->IsEmptyDest() ) 
		{
			if( pMover->m_pActMover->IsActJump() == FALSE && (pMover->m_pActMover->IsStateFlag( OBJSTAF_SIT ) ) == 0 )	// 앉아있을땐 실행하면 안된다.
			{
				if( pMover->SendActMsg( OBJMSG_STAND ) == 1 )
				{
					//fMoved	= true;
					fBehavior = true;
				}
			}
		}
	}