Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crouch blockbot #599

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Crouch blockbot #599

wants to merge 2 commits into from

Conversation

ef3d0c3e
Copy link

@ef3d0c3e ef3d0c3e commented Dec 8, 2020

Added this meme feature for griefing

@@ -43,13 +42,35 @@ void Autoblock::CreateMove(CUserCmd* cmd)
if (!target)
return;

bool crouchBlock = false;
if (target->GetBonePosition(BONE_PELVIS).z < localplayer->GetAbsOrigin().z &&
Vector(localplayer->GetAbsOrigin() - target->GetAbsOrigin()).LengthSqr() < 1e5)
Copy link

@acuifex acuifex Dec 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you could do something like
localplayer->GetAbsOrigin().z - target->GetAbsOrigin().z >= entity->GetCollideable()->OBBMaxs().z
and add other checks that i'm on top then i THINK it would be working better.

edit: that is probably some incorrect code but i think you get the idea.

@ef3d0c3e
Copy link
Author

ef3d0c3e commented Dec 8, 2020

I uptated the detection with your idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants