Glow green if visible
dragutinv55 opened this issue · 4 comments
I was trying to implement green glow, if enemy is visible using this code:
if (Wallhack)
{
Entity ent = CreateEntity(EntityAddr);
if (ent.isValidPlayer() && !ent.IsDormant())
{
Vector3 localPosition = LocalPlayerEnt.getHeadPosition();
Vector3 entityPosition = ent.GetBonePosition(HEAD_BONE_ID);
aim.parseMap();
bool Visible = bspParser.is_visible(localPosition, entityPosition, true);
//pass Visible=true flag to draw green glow
ent.SetCorrectGlowStruct(OurTeam, GlowObject, Visible);
}
}
The problem is that it shows green glow even behind the doors and on the edges of the walls. If it is behind a wall - it works OK. Is there an easy way to create is_truly_visible to include doors, smokes etc. ?
You can start by searching about BSP parsing and how to make it more precise. If you can improve the current one in this project, we would love to see a PR and test it.
+1
When checking the articles they say that BSP is not that precise technique. Found some code that uses TraceRay call in cs libs like this:
CreateInterface = (tCreateInterface)GetProcAddress((HMODULE)enginedll, "CreateInterface");
IEngineTrace* EngineTrace = (IEngineTrace*)GetInterface(CreateInterface, "EngineTraceClient004");
...
ray.Init(eyepos, targeteyepos);
EngineTrace->TraceRay(ray, MASK_SHOT | CONTENTS_GRATE, &tracefilter, &trace);
Do you think it would be possible to call this from driver using something like KeUserModeCallBack
?
Big NO for you. You can't treat kernel like you are internal. We just told you what you should be doing, instead ur just asking us pretty much non sense. I already have seen some good bsp parsing examples, it's doable. If you don't want that, you should be going internal and using trace ray instead.
Please for everyone reading this, @dretax made a wonderful base for newcomers to learn about kernel hacking. Please use this project for learning and not just cheating.