Raised This Month: $51 Target: $400
 12% 

Ladder jump -> jump direction


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
abckrieger
Senior Member
Join Date: Oct 2012
Location: Germany
Old 12-28-2014 , 02:27   Ladder jump -> jump direction
Reply With Quote #1

Hey,
I'm working on a jumpstats plugin for cs:go and this contains a jump style called "ladderjump". The following picture shows 2 sketches. The left sketch how a legit ladder jump looks like. Player x jumps forward to a block with the same ground level as the ladder. This technique requires a lot of skill because you need to have a correct view angle to get a good pre speed at the upper ladder edge. The right sketch shows an easier way to get a good ladder jump distance. You just have to "slide off" the ladder at the highest point. It's kinda hard to explain.. You don't have to align your view angle to get a good prespeed. I hope those 2 sketches help to imagine my issue. I have no idea how to check whether player x jumped forward in relation to the ladder orientation. I have only a method which checks the jump direction on normal jumps (but that does not help here):

thx4help

Last edited by abckrieger; 12-28-2014 at 16:04.
abckrieger is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 12-28-2014 , 12:32   Re: Ladder jump -> jump direction
Reply With Quote #2

Could you rephrase the question? Maybe you can use the m_vecLadderNormal sendprop on the player when he jumps of.

https://mxr.alliedmods.net/hl2sdk-sd...ement.cpp#2939

Maybe showing what you tried helps too.
__________________
Peace-Maker is offline
abckrieger
Senior Member
Join Date: Oct 2012
Location: Germany
Old 12-28-2014 , 15:55   Re: Ladder jump -> jump direction
Reply With Quote #3

thats the method i was talking about. But that does not help on ladder jumps because i need to bring in ladder orientation to detect the actual moving direction on ladder jumps.

Code:
stock Float:GetClientMovingDirection(client)
{
    new Float:fVelocity[3];
    GetEntPropVector(client, Prop_Data, "m_vecAbsVelocity", fVelocity);
       
    new Float:fEyeAngles[3];
    GetClientEyeAngles(client, fEyeAngles);

    if(fEyeAngles[0] > 70.0) fEyeAngles[0] = 70.0;
    if(fEyeAngles[0] < -70.0) fEyeAngles[0] = -70.0;

    new Float:fViewDirection[3];
    GetAngleVectors(fEyeAngles, fViewDirection, NULL_VECTOR, NULL_VECTOR);
       
    NormalizeVector(fVelocity, fVelocity);
    NormalizeVector(fViewDirection, fViewDirection);

    new Float:direction = GetVectorDotProduct(fVelocity, fViewDirection);
    return direction;
}

Last edited by abckrieger; 12-28-2014 at 16:24.
abckrieger is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 12-29-2014 , 04:58   Re: Ladder jump -> jump direction
Reply With Quote #4

If the return value of that snippet is > 0, you know the player is loosely looking in the direction he's going.

If you first check if the player is looking in the direction he's moving to with that method and next see if he's moving close to the ladder's normal direction, you would know if he's jumping straight of a ladder or not. It's the same code as above, just replacing the player viewdirection with the ladder normal.

You might have to invert the ladder normal, depending on what you define as "forward" ;)
__________________
Peace-Maker is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:49.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode