rollraw/qo0-csgo

Unable to move forward with fake yaw enabled due to micromovement when knife is out

Racc-Boi opened this issue · 4 comments

Quick fix I threw together I'm presuming this is a known issue but oh well:

	// fake
	if (C::Get<bool>(Vars.bAntiAimYawFake))
	{
		// determine max possible delta value of desynchronization
		// it doesn't necessary to use exact value because server will always clamp higher values itself
		const float flMaxDesyncDelta = GetMaxDesyncDelta(pAnimationState);

		// determine if we are pressing a movement button or not if we are
		const bool bPressingMove = (pCmd->nButtons & (IN_LEFT) || pCmd->nButtons & (IN_FORWARD) || pCmd->nButtons & (IN_BACK) ||
		pCmd->nButtons & (IN_RIGHT) || pCmd->nButtons & (IN_MOVELEFT) || pCmd->nButtons & (IN_MOVERIGHT) || pCmd->nButtons & (IN_JUMP));

		/*
		 * force game to always update lower body yaw when standing
		 * to do this we need to keep player velocity greater than (CS_PLAYER_SPEED_STOPPED = 1.0f)
		 *
		 * @ida: server.dll -> "F3 0F 10 05 ? ? ? ? 0F 2F 86 ? ? ? ? 72"
		 * @source: master/game/shared/cstrike15/csgo_playeranimstate.cpp#L2380
		 */
		if (pAnimationState->bOnGround && !pAnimationState->bOnLadder && pLocal->GetVelocity().Length2DSqr() < 25.f && !bPressingMove)
		{
			/*
			 * compute speed we need to force to reach desired velocity
			 * since duck have its own modifier on velocity (CS_PLAYER_SPEED_DUCK_MODIFIER = 0.34f)
			 * we should also take this into account, reciprocal of it is 2.94f, 1.01 * 2.94 = 2.97
			 */
			const float flWishSpeed = ((pCmd->nButtons & IN_DUCK) ? 2.97f : 1.01f);

			// switch direction every tick so we're "sliding" at same place
			pCmd->flForwardMove = ((pCmd->iCommandNumber & 1) ? +flWishSpeed : -flWishSpeed);
		}

		if (!*pbSendPacket)
			angModifiedView.y -= (bInverter ? +flMaxDesyncDelta : -flMaxDesyncDelta);

		angModifiedView.Normalize();
	}

I didn't have anything like this the last time i checked, can u elaborate more on this?

I didn't have anything like this the last time i checked, can u elaborate more on this?

nothing much more than what i said tbh when i had fake yaw enabled for some reason and a knife out i just couldn't move forward or backwards due to micromovement its weird and i cant see whats causing it tbh

what else do you have enabled? where does this happens to you on local/community/valve server? also try if issue still persists on the latest commit for you.

what else do you have enabled? where does this happens to you on local/community/valve server? also try if issue still persists on the latest commit for you.

Information:

  • latest commit
  • local server (haven't tested on a pub server)
  • only fake aa on + other features don't affect it

note: I'm currently away so I can't test on public servers so might want to get someone else to try this was also compiled with latest version of msvc compiler on visual studio