Question Adaptive Circlestrafe help plz

  • CSGO recently moved logic from 'client_panorama.dll' to 'client.dll', you must update all code that uses 'client_panorama.dll' and replace it with 'client.dll' or the code will not work.
Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

emilo0212

Newbie
Silenced
Aug 19, 2013
25
234
0
I've made a simple method of using the TraceRay function to check my distance to the wall, I've heard things about grabbing the trace_t.fraction and checking if it's < 1.0f, but I decided to do it this way and it seems to print the correct results out in the console.

The thing I can't figure out, is how I should move my player accordingly to the raytracing, I'd appreciate any kind of help, I have no intentions to c+p, I literally wanna understand how it works.

My current code, credits to: unkn0wncheats, mpqh, esoterik, TheDragon(from utube).

C++:
auto GetDistanceToWall(Vector traceStart, Vector traceEnd, C_BasePlayer* localplayer) 
{
    trace_t tr;
    Ray_t ray;

    ray.Init(traceStart, localplayer->GetVecOrigin() + traceEnd);
    CTraceFilterWorldOnly traceFilter;
    traceFilter.pSkip = localplayer;

    trace->TraceRay(ray, MASK_SHOT, &traceFilter, &tr);

    auto probableDistance = ( ( tr.endpos -  localplayer->GetVecOrigin() ).Length() / 100.f );

    return probableDistance;
}
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods