Need help with c-strafer

Posts 1–6 of 6 · Page 1 of 1
Need help with c-strafer
hi im a big dumb paster
i have some code for circle-strafing & it works but whenever i execute it i get some big lag



there's an example for ya

the code is here:
Code:
void StartStrafe(CUserCmd *pCmd)
{
	IClientEntity* pLocal = hackManager.pLocal();
	StrafeAngle = 0;
	IsActive = true;

	QAngle CurrentAngles;
	CurrentAngles.x = 0;
	CurrentAngles.y = 0;
	Vector Forward = CurrentAngles.Direction();
	Vector Right = Forward.Cross(Vector(0, 0, 1));
	Vector Left = Vector(-Right.x, -Right.y, Right.z);

	float LeftPath = GetTraceFractionWorldProps(pLocal->GetAbsOrigin() + Vector(0, 0, 10), pLocal->GetAbsOrigin() + Left * 450.f + Vector(0, 0, 10));
	float RightPath = GetTraceFractionWorldProps(pLocal->GetAbsOrigin() + Vector(0, 0, 10), pLocal->GetAbsOrigin() + Right * 450.f + Vector(0, 0, 10));

	RightMovement = 1;
}

void Strafe(CUserCmd *pCmd)
{
	IClientEntity* pLocal = hackManager.pLocal();
	Vector Velocity = pLocal->GetVelocity();
	Velocity.z = 0;
	float Speed = Velocity.Length();
	if (Speed < 45) Speed = 45;
	if (Speed > 750) Speed = 750;

	float FinalPath = GetTraceFractionWorldProps(pLocal->GetAbsOrigin() + Vector(0, 0, 10), pLocal->GetAbsOrigin() + Vector(0, 0, 10) + Velocity / 2.0f);
	float DeltaAngle = RightMovement * fmax((275.0f / Speed) * (2.0f / FinalPath) * (128.0f / (1.7f / Interfaces::Globals->interval_per_tick)) * CircleFactor, 2.0f);
	StrafeAngle += DeltaAngle;

	if (fabs(StrafeAngle) >= 360.0f)
	{
		StrafeAngle = 0.0f;
		IsActive = false;
		//RightMovement = 0;
	}
	else
	{
		pCmd->forwardmove = cos((StrafeAngle + 90 * RightMovement) * (M_PI / 180.0f)) * 450.f;
		pCmd->sidemove = sin((StrafeAngle + 90 * RightMovement) * (M_PI / 180.0f)) * 450.f;
	}
}
are you sure its the circle strafer? maybe youve bound something else to this key lol
Quote Originally Posted by certmemer View Post
are you sure its the circle strafer? maybe youve bound something else to this key lol
seems to be the circle strafer. just checked for anything that was bound to mouse4 and re-bound them to different keys, so that the circle strafer was the only thing executing while mouse4 is down.
error still happens.
just stopping by to say i love the menu, it looks like you modified it to look like that since i dont regonize the format, so good work.
debug it in the retarded way
basically comment everything and see what line causes that console spam
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us