get good get legendware
-
Автор темы
- #1
main resolver part
animfix part
in the header
usage example :-
C++:
void CResolver::check_low()
{
float delta_center = abs(player_record->layers[6].m_flPlaybackRate - resolver_layers[0][6].m_flPlaybackRate);
float delta_right = abs(player_record->layers[6].m_flPlaybackRate - resolver_layers[1][6].m_flPlaybackRate);
float delta_left = abs(player_record->layers[6].m_flPlaybackRate - resolver_layers[2][6].m_flPlaybackRate);
float delta_low_right = abs(player_record->layers[6].m_flPlaybackRate - resolver_layers[3][6].m_flPlaybackRate);
float delta_low_left = abs(player_record->layers[6].m_flPlaybackRate - resolver_layers[4][6].m_flPlaybackRate);
auto e = player;
if (delta_left > delta_center && delta_left > delta_low_left)
// full left
if (delta_right > delta_center && delta_right > delta_low_right)
// full right
if (delta_low_left > delta_left && delta_low_left > delta_center)
// low left
if (delta_low_right > delta_right && delta_low_right > delta_center)
// low right
}
animfix part
C++:
// --- first --- \\
animstate->m_flGoalFeetYaw = middle;
g_ctx.globals.updating_animation = true;
e->m_bClientSideAnimation() = true;
e->update_clientside_animation();
e->m_bClientSideAnimation() = false;
g_ctx.globals.updating_animation = false;
setup_matrix(e, animlayers, NONE);
memcpy(animstate, &state, sizeof(c_baseplayeranimationstate));
memcpy(player_resolver[e->EntIndex()].resolver_layers[0], e->get_animlayers(), e->animlayer_count() * sizeof(AnimationLayer));
memcpy(e->m_CachedBoneData().Base(), record->matrixes_data.zero, e->m_CachedBoneData().Count() * sizeof(matrix3x4_t));
// --- \\
// --- second --- \\
animstate->m_flGoalFeetYaw = right;
g_ctx.globals.updating_animation = true;
e->m_bClientSideAnimation() = true;
e->update_clientside_animation();
e->m_bClientSideAnimation() = false;
g_ctx.globals.updating_animation = false;
setup_matrix(e, animlayers, FIRST);
memcpy(animstate, &state, sizeof(c_baseplayeranimationstate));
memcpy(player_resolver[e->EntIndex()].resolver_layers[1], e->get_animlayers(), e->animlayer_count() * sizeof(AnimationLayer));
memcpy(e->m_CachedBoneData().Base(), record->matrixes_data.first, e->m_CachedBoneData().Count() * sizeof(matrix3x4_t));
// --- \\
// --- third --- \\
animstate->m_flGoalFeetYaw = left;
g_ctx.globals.updating_animation = true;
e->m_bClientSideAnimation() = true;
e->update_clientside_animation();
e->m_bClientSideAnimation() = false;
g_ctx.globals.updating_animation = false;
setup_matrix(e, animlayers, SECOND);
memcpy(animstate, &state, sizeof(c_baseplayeranimationstate));
memcpy(player_resolver[e->EntIndex()].resolver_layers[2], e->get_animlayers(), e->animlayer_count() * sizeof(AnimationLayer));
memcpy(e->m_CachedBoneData().Base(), record->matrixes_data.second, e->m_CachedBoneData().Count() * sizeof(matrix3x4_t));
// --- \\
// --- low second --- \\
animstate->m_flGoalFeetYaw = low_right;
g_ctx.globals.updating_animation = true;
e->m_bClientSideAnimation() = true;
e->update_clientside_animation();
e->m_bClientSideAnimation() = false;
g_ctx.globals.updating_animation = false;
setup_matrix(e, animlayers, LOW_FIRST);
memcpy(animstate, &state, sizeof(c_baseplayeranimationstate));
memcpy(player_resolver[e->EntIndex()].resolver_layers[3], e->get_animlayers(), e->animlayer_count() * sizeof(AnimationLayer));
memcpy(e->m_CachedBoneData().Base(), record->matrixes_data.second, e->m_CachedBoneData().Count() * sizeof(matrix3x4_t));
// --- \\
// --- low third --- \\
animstate->m_flGoalFeetYaw = low_left;
g_ctx.globals.updating_animation = true;
e->m_bClientSideAnimation() = true;
e->update_clientside_animation();
e->m_bClientSideAnimation() = false;
g_ctx.globals.updating_animation = false;
setup_matrix(e, animlayers, LOW_SECOND);
memcpy(animstate, &state, sizeof(c_baseplayeranimationstate));
memcpy(player_resolver[e->EntIndex()].resolver_layers[4], e->get_animlayers(), e->animlayer_count() * sizeof(AnimationLayer));
memcpy(e->m_CachedBoneData().Base(), record->matrixes_data.second, e->m_CachedBoneData().Count() * sizeof(matrix3x4_t));
in the header
C++:
AnimationLayer resolver_layers[5][15];
usage example :-
C++:
float speed = e->m_vecVelocity().Length();
bool move_anim = false;
if (int(player_record->layers[6].m_flWeight * 1000.f) == int(previous_layers[6].m_flWeight * 1000.f))
move_anim = true;
auto animstate = player->get_animation_state();
if (!animstate)
return;
bool ducking = animstate->m_fDuckAmount && e->m_fFlags() & FL_ONGROUND && !animstate->m_bInHitGroundAnimation;
auto valid_move = true;
if (animstate->m_velocity > 0.1f || fabs(animstate->flUpVelocity) > 100.f)
valid_move = animstate->m_flTimeSinceStartedMoving < 0.22f;
if (!valid_move && move_anim || /*micromovement check pog*/ speed >= 3.1f && ducking || speed >= 1.2f && !ducking)
{
if ((speed >= 1.2f && speed < 134.f) &&!ducking && (slow_walking1 || slow_walking2))
player_record->curMode = SLOW_WALKING;
else
player_record->curMode = MOVING;
// resolve here , if you miss a shot then switch side
}