- Статус
- Оффлайн
- Регистрация
- 13 Май 2022
- Сообщения
- 161
- Реакции
- 32
Hello Ruskies!
Today i will cover the topic of resolving in 2k23 legacy hvh and tell you about a few common misconceptions. Please give me feedback and correct me if i say something wrong in the replies))
Getting started: Make sure you have a proper animfix !!!
purplehack (noad) propably has the best public animationfix you can use as a reference.
However please do not just mindlessly paste the code without knowing what it does and ask for help later!
This is the most important step out of them all, if you dont have an animationfix thats correct, you wont hit P any time soon. Useful resources:
Also use any reverse engineering software of your choice to look at the server animation code.
For years i have seen stuff like this:
or this:
Do not and i repeat DO NOT use llamas 5 year old meme method of using animlayer 6, you wont get anywhere if you arent properly simulating the layers, which i bet you are not. Also actually using the data is done wrong in the public reversed versions.
Aswell as using animlayer 3 to resolve "lby breaker" is not possible. What you want to do is some sort of anti-freestanding
Example:
THIS CODE IS NOT PERFECT, MAKE YOUR OWN!
Note that you can also run FireBullet through your autowall and compare damages / visibility of the players hitbox.
This should only be used if the player is sideways, so make sure to take that into account.
To check if a player is sideways, you will need a function to check if a value is near or equal a certain value. example:
This is gonna be useful, to look for sideways people since you can calculate the AtTargets yaw from the enemy like this:
M:: Vector ToAngles (g:Local->origin () - with my->origin ().yaw
And then comparing it to their actual yaw using AngleDiff.
You check if their delta yaw is ~90° (sideways) and then apply the antifreestand side.
Once you have done that, your next goal is to make a proper safepoint system.
While people are moving (high speed) they will ALWAYS have an overlap of their real and their desync. (thanks to riptide update).
"Jitter" also does not need any form of resolving, it is fixed through backtracking / safepoints and a proper animationfix.
Note: @Laynie pointed out that since operation riptide jitter may cause misses, due to the animation bugs, so if theres no safepoint or they are breaking lc and you have no valid previous records, you will have to predict their angle.
People in air also do not need to pe resolved, just make sure to have multipoints high enough to shoot.
The only cases where you actually need to resolve are people with static antiaim aswell as people crouching.
There are plenty of public resources on this topic. Note that m_angEyeAngles and m_flLowerBodyYawTarget are NOT networked.
The most reliable way is to just use bruteforce))
Note that all "defensive resolvers" are most likely useless because you cannot "resolve" invalidated ticks. If you want to improve your cheat shooting at defensive antiaim, make sure to make a proper lagcompensation and check for aliveloop cycle. Another thing you can try is to just extrapolate on defensive, but you will end up like primordial if you dont make proper logic for it.
I hope i could clear some things up and enlighten you people :roflanStat:
Today i will cover the topic of resolving in 2k23 legacy hvh and tell you about a few common misconceptions. Please give me feedback and correct me if i say something wrong in the replies))
Getting started: Make sure you have a proper animfix !!!
purplehack (noad) propably has the best public animationfix you can use as a reference.
However please do not just mindlessly paste the code without knowing what it does and ask for help later!
This is the most important step out of them all, if you dont have an animationfix thats correct, you wont hit P any time soon. Useful resources:
Пожалуйста, авторизуйтесь для просмотра ссылки.
(noad)Also use any reverse engineering software of your choice to look at the server animation code.
For years i have seen stuff like this:
Extracted from random lw paste:
const auto delta_right = fabsf(player_record->layers[ANIMATION_LAYER_MOVEMENT_MOVE].m_flPlaybackRate
- player_record->resolver_layers[ROTTE_RIGHT] [ANIMATION_LAYER_MOVEMENT_MOVE].m_flPlPllaybackRate);
const auto delta_left = fabsf(player_record->layers[ANIMATION_LAYER_MOVEMENT_MOVE].m_flPlaybackRate
- player_record->resolver_layers [ROTTE_LEFT] [ANIMATION_LAYER_MOVEMENT_MOVE].m_flPlPllaybackRate);
const auto delta_server = fabsf(player_record->layers[ANIMATION_LAYER_MOVEMENT_MOVE].m_flPlaybackRate
- player_record->resolver_layers[ROTTE_SERVER] [ANIMATION_LAYER_MOVEMENT_MOVE].m_flPlPllaybackRate);
fleet last_delta{};
if (!(delta_server * 1000.0f))
last_delta = delta_server;
if (!(delta_right * 1000.0f) && last_delta >= delta_right)
{
if (globals.g.missed_shots[idx] % 3)
animstate->m_flGoalFeetYaw = math:: NordlizeYaw (GetAngle (player) + player->delta_by_ref ();
last_delta = delta_right;
}
if (!(delta_left * 1000.0f) && last_delta >= delta_left)
{
if (globals.g.missed_shots[idx] % 3)
animstate->m_flGoalFeetYaw = math:: NormalizeYaw (GetAngle (player) - player->delta_by_ref ());
}
or this:
Also random lw paste:
bool CResolver::is_breaking_lby(AnimationLayer cur_layer, AnimationLayer prev_layer)
{
if (IsAdjustingBalance())
{
if (IsAdjustingBalance())
{
if ((prev_layer.m_flCycle != cur_layer.m_flCycle) || cur_layer.m_flWeight == 1.f)
{
return true;
}
else if (cur_layer.m_flWeight == 0.f && (prev_layer.m_flCycle > 0.92f && cur_layer.m_flCycle > 0.92f))
{
return true;
}
}
return false;
}
return false;
}
Do not and i repeat DO NOT use llamas 5 year old meme method of using animlayer 6, you wont get anywhere if you arent properly simulating the layers, which i bet you are not. Also actually using the data is done wrong in the public reversed versions.
Aswell as using animlayer 3 to resolve "lby breaker" is not possible. What you want to do is some sort of anti-freestanding
Example:
Credits: x64penguin | arctictech:
void CResolver::DetectFreestand(CBasePlayer* player, LagRecord* record, const std::deque<LagRecord>& records) {
if (records.size() < 16)
return;
Vector eyePos = player->m_vecOrigin() + Vector(0, 0, 64 - player->m_flDuckAmount() * 16.f);
Vector forward = (Cheat.LocalPlayer->m_vecOrigin() - player->m_vecOrigin()).Q_Normalized();
fleet notModifiedYaw = player->m_angEyeAngles ().yaw;
if (record->resolver_data.antiaim_type != R_AntiAimType::STATIC)
notModifiedYaw = FindAvgYaw (records);
Vector right = Math::AngleVectors(QAngle(5.f, notModifiedYaw + 90.f, 0));
Vector negPos = eyePos - right * 23.f;
Vector posPos = eyePos + right * 23.f;
CTraceFilterWorldAndPropsOnly filter;
Ray_t rayNeg (negPos, negPos + forward * 128.f);
Ray_t rayPos(posPos, posPos + forward * 128.f);
CGameTrace negTrace, posTrace;
EngineTrace->TraceRay(rayNeg, MASK_SHOT_HULL | CONTENTS_GRATE, &filter, &negTrace);
EngineTrace->TraceRay(rayPos, MASK_SHOT_HULL | CONTENTS_GRATE, &filter, &posTrace);
if (negTrace.startsolid && posTrace.startsolid) {
record->resolver_data.side = 0;
record->resolver_data.resolver_type = ResolverType:::NONE;
return;
}
else if (negTrace.startsolid) {
record->resolver_data.side = -1;
record->resolver_data.resolver_type = ResolverType:::FREESTAND;
return;
}
else if (posTrace.startsolid) {
record->resolver_data.side = 1;
record->resolver_data.resolver_type = ResolverType:::FREESTAND;
return;
}
if (negTrace.fraction == 1.f && posTrace.fraction == 1.f) {
record->resolver_data.side = 0;
record->resolver_data.resolver_type = ResolverType:::NONE;
return;
}
record->resolver_data.side = negTrace.fraction < posTrace.fraction ? -1 : 1;
record->resolver_data.resolver_type = ResolverType:::FREESTAND;
}
Note that you can also run FireBullet through your autowall and compare damages / visibility of the players hitbox.
This should only be used if the player is sideways, so make sure to take that into account.
To check if a player is sideways, you will need a function to check if a value is near or equal a certain value. example:
In Math:
inline bool IsNearEqual(float v1, float v2, float Tolerance)
{
return std::abs(v1 - v2) <= std::abs(Tolerance);
}
This is gonna be useful, to look for sideways people since you can calculate the AtTargets yaw from the enemy like this:
M:: Vector ToAngles (g:Local->origin () - with my->origin ().yaw
And then comparing it to their actual yaw using AngleDiff.
You check if their delta yaw is ~90° (sideways) and then apply the antifreestand side.
Once you have done that, your next goal is to make a proper safepoint system.
While people are moving (high speed) they will ALWAYS have an overlap of their real and their desync. (thanks to riptide update).
"Jitter" also does not need any form of resolving, it is fixed through backtracking / safepoints and a proper animationfix.
Note: @Laynie pointed out that since operation riptide jitter may cause misses, due to the animation bugs, so if theres no safepoint or they are breaking lc and you have no valid previous records, you will have to predict their angle.
People in air also do not need to pe resolved, just make sure to have multipoints high enough to shoot.
The only cases where you actually need to resolve are people with static antiaim aswell as people crouching.
There are plenty of public resources on this topic. Note that m_angEyeAngles and m_flLowerBodyYawTarget are NOT networked.
The most reliable way is to just use bruteforce))
Note that all "defensive resolvers" are most likely useless because you cannot "resolve" invalidated ticks. If you want to improve your cheat shooting at defensive antiaim, make sure to make a proper lagcompensation and check for aliveloop cycle. Another thing you can try is to just extrapolate on defensive, but you will end up like primordial if you dont make proper logic for it.
I hope i could clear some things up and enlighten you people :roflanStat:
Последнее редактирование: