Results 1 to 6 of 6
  1. #1
    axio42's Avatar
    Join Date
    Feb 2017
    Gender
    male
    Posts
    37
    Reputation
    10
    Thanks
    6

    Post 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;
    	}
    }
    Last edited by axio42; 04-26-2017 at 06:20 PM.

  2. #2
    certmemer's Avatar
    Join Date
    Feb 2016
    Gender
    female
    Location
    Southampton
    Posts
    2,511
    Reputation
    104
    Thanks
    25,994
    are you sure its the circle strafer? maybe youve bound something else to this key lol

  3. #3
    axio42's Avatar
    Join Date
    Feb 2017
    Gender
    male
    Posts
    37
    Reputation
    10
    Thanks
    6
    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.

  4. #4
    BilllyBobJoel's Avatar
    Join Date
    Oct 2016
    Gender
    male
    Posts
    48
    Reputation
    10
    Thanks
    10
    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.

  5. The Following User Says Thank You to BilllyBobJoel For This Useful Post:

    axio42 (04-26-2017)

  6. #5
    certmemer's Avatar
    Join Date
    Feb 2016
    Gender
    female
    Location
    Southampton
    Posts
    2,511
    Reputation
    104
    Thanks
    25,994
    debug it in the retarded way
    basically comment everything and see what line causes that console spam

  7. #6
    certmemer's Avatar
    Join Date
    Feb 2016
    Gender
    female
    Location
    Southampton
    Posts
    2,511
    Reputation
    104
    Thanks
    25,994
    nice job!!

Similar Threads

  1. [Help Request] Need Help With A.V.A Error
    By ch1025 in forum Alliance of Valiant Arms (AVA) Help
    Replies: 7
    Last Post: 05-14-2011, 09:15 AM
  2. [Help Request] Need help with making binds !
    By JonathanTBM in forum Vindictus Help
    Replies: 4
    Last Post: 05-10-2011, 07:40 PM
  3. [Help Request] Need help with numpad while recording macro !
    By JonathanTBM in forum Vindictus Help
    Replies: 2
    Last Post: 05-10-2011, 07:37 PM
  4. [Help Request] need help with mod
    By .:MUS1CFR34K:. in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 4
    Last Post: 05-01-2011, 12:40 PM
  5. [Help Request] need help with modding
    By BayBee Alyn in forum Combat Arms Help
    Replies: 0
    Last Post: 04-27-2011, 09:06 PM