-
Автор темы
- #1
After somes tries, the chat gpt maded it for me. I sended the default resolver stand of supremacy, and said to make lby pred better and talk what got changed.
C++:
void Resolver::ResolveStandPosition(AimPlayer* aimPlayer, LagRecord* currentRecord)
{
if (g_menu.main.config.mode.get() == 1)
{
StandNoSpread(aimPlayer, currentRecord);
return;
}
const float MaxPositionDelta = 128.0f;
LagRecord* previousMoveRecord = &aimPlayer->m_walk_record;
if (previousMoveRecord->m_sim_time > 0.0f)
{
const float positionDelta = (previousMoveRecord->m_origin - currentRecord->m_origin).Length();
aimPlayer->m_moved = positionDelta <= MaxPositionDelta;
}
const float delta = math::NormalizedAngle(currentRecord->m_body - previousMoveRecord->m_body);
const float deltaTime = currentRecord->m_anim_time - previousMoveRecord->m_anim_time;
if (aimPlayer->m_moved && deltaTime < 0.22f)
{
currentRecord->m_eye_angles.y = previousMoveRecord->m_body;
currentRecord->m_mode = Modes::ResolveStoppedMoving;
return;
}
bool lbyUpdated = false;
if (previousMoveRecord->m_anim_time != FLT_MAX)
{
const float lbyDelta = math::NormalizedAngle(currentRecord->m_body - previousMoveRecord->m_body);
lbyUpdated = deltaTime > 1.1f && lbyDelta != 0.0f;
}
if (lbyUpdated)
{
aimPlayer->m_bodyUpdate = currentRecord->m_anim_time + 1.1f;
if (aimPlayer->m_bodyIndex++ < 3)
{
currentRecord->m_eye_angles.y = currentRecord->m_body;
currentRecord->m_mode = Modes::ResolveBody;
}
else
{
currentRecord->m_mode = Modes::ResolveStand1;
C_AnimationLayer* currentLayer = ¤tRecord->m_layers[3];
int currentActivity = aimPlayer->m_player->GetSequenceActivity(currentLayer->m_sequence);
currentRecord->m_eye_angles.y = previousMoveRecord->m_body;
if (aimPlayer->m_standIndex++ % 3 == 0)
{
currentRecord->m_eye_angles.y += g_csgo.RandomFloat(-35.0f, 35.0f);
}
if (aimPlayer->m_standIndex > 6 && currentActivity != 980)
{
currentRecord->m_eye_angles.y = previousMoveRecord->m_body + 180.0f;
}
else if (aimPlayer->m_standIndex > 4 && currentActivity != 980)
{
currentRecord->m_eye_angles.y = GetAwayAngle(currentRecord) + 180.0f;
}
}
}
else
{
currentRecord->m_mode = Modes::ResolveStand2;
switch( data->m_stand_index2 % 6 ) {
case 0:
record->m_eye_angles.y = away + 180.f;
break;
case 1:
record->m_eye_angles.y = record->m_body;
break;
case 2:
record->m_eye_angles.y = record->m_body + 180.f;
break;
case 3:
record->m_eye_angles.y = record->m_body + 110.f;
break;
case 4:
record->m_eye_angles.y = record->m_body - 110.f;
break;
case 5:
record->m_eye_angles.y = away;
break;
default:
break;
}
}