-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
сама функция player list:
Ресольвер:
Пожалуйста, зарегистрируйтесь или авторизуйтесь, чтобы увидеть содержимое.
Ресольвер:
void LBYResolver(Vector* & Angle, PlayerList::CPlayer* Player)
{
static int iLastUpdatedTick = 0;
Player->reset.y = Angle->y;
static Vector orginalview = Vector(0, 0, 0);
if (orginalview.x != Angle->x)
orginalview.x = Angle->x;
if (Angle->y != Player->resolved)
{
orginalview.y = Angle->y;
float flResolve = 0.f;
float flLowerBodyYaw = Player->entity->GetLowerBodyYaw();
int difference = orginalview.y - flLowerBodyYaw;
iLastUpdatedTick++;
if (Player->entity->GetVecVelocity().Length2D() == 0)
{
int temp = static_cast<int>(floor(Player->flEyeAng - Player->flLastPelvisAng));
while (temp < 0)
temp += 360;
while (temp > 360)
temp -= 360;
Player->Backtrack[temp] = flLowerBodyYaw - Player->flEyeAng;
}
if (Player->entity->GetVecVelocity().Length2D() >= 1)
{
flResolve = flLowerBodyYaw;
}
else
{
int temp = static_cast<int>(floor(Player->flEyeAng - Player->flLastPelvisAng));
while (temp < 0)
temp += 360;
while (temp > 360)
temp -= 360;
Player->Backtrack[temp] = flLowerBodyYaw - Player->flEyeAng;
}
Angle->y = flResolve;
Player->resolved = Angle->y;
}
}
{
static int iLastUpdatedTick = 0;
Player->reset.y = Angle->y;
static Vector orginalview = Vector(0, 0, 0);
if (orginalview.x != Angle->x)
orginalview.x = Angle->x;
if (Angle->y != Player->resolved)
{
orginalview.y = Angle->y;
float flResolve = 0.f;
float flLowerBodyYaw = Player->entity->GetLowerBodyYaw();
int difference = orginalview.y - flLowerBodyYaw;
iLastUpdatedTick++;
if (Player->entity->GetVecVelocity().Length2D() == 0)
{
int temp = static_cast<int>(floor(Player->flEyeAng - Player->flLastPelvisAng));
while (temp < 0)
temp += 360;
while (temp > 360)
temp -= 360;
Player->Backtrack[temp] = flLowerBodyYaw - Player->flEyeAng;
}
if (Player->entity->GetVecVelocity().Length2D() >= 1)
{
flResolve = flLowerBodyYaw;
}
else
{
int temp = static_cast<int>(floor(Player->flEyeAng - Player->flLastPelvisAng));
while (temp < 0)
temp += 360;
while (temp > 360)
temp -= 360;
Player->Backtrack[temp] = flLowerBodyYaw - Player->flEyeAng;
}
Angle->y = flResolve;
Player->resolved = Angle->y;
}
}