internal ray trace crashing

Posts 16 of 6 · Page 1 of 1
internal ray trace crashing
Code:
Ray_t ray;
trace_t tr;
CTraceFilter filter;
filter.pSkip = pLocalPlayer;
ray.Init(pLocalPlayer->EyePosition(), GetBonePosition(pLocalPlayer, 6));
Interfaces->EngineTrace->TraceRay(ray, MASK_SHOT_HULL | CONTENTS_HITBOX, &filter, &tr);
This crashes my game, anyone know why?

I'm still fairly new to internal.
Maybe you should use the constructor for the CTraceFilter
Quote Originally Posted by Orinion77 View Post
Maybe you should use the constructor for the CTraceFilter
Constructor is automatically called whenever you define/create an object (that is not a pointer).

@sethxi Debug your code. Visual Studio makes it really easy to find out where it crashes, it even tells you the line. Attach VS to CSGO after you inject your DLL, and then VS will point out what went wrong (most times).

It's most likely an invalid address or wrong VFunction index.
Debug it?

//10chars
Oh yeah, I forgot that VS can do that. Thanks for the info.

- - - Updated - - -

I've attached Visual Studio to CS:GO but it doesn't really do much. When CS:GO crashes it just says it exited with code 100.
Quote Originally Posted by sethxi View Post
Oh yeah, I forgot that VS can do that. Thanks for the info.

- - - Updated - - -

I've attached Visual Studio to CS:GO but it doesn't really do much. When CS:GO crashes it just says it exited with code 100.
You are doing it wrong.
You should get a file back called "YourhacknameDebug".dll
Posts 16 of 6 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?