dopamine > all
-
Автор темы
- #1
[HIDE="10"]
[/HIDE]
Код:
for (int i = 0; i < Interfaces::EntList->GetHighestEntityIndex(); ++i)
{
IClientEntity *pEntity = Interfaces::EntList->GetClientEntity(i);
static float lowerDelta[64];
static float lastYaw[64];
float curLower = pEntity->GetLowerBodyYaw();
float curYaw = flYaw;
lowerDelta[i] = curYaw - curLower;
pNormalize1(lowerDelta[i]);
if (fabs(lowerDelta[i]) > 15.f)
{
if (pEntity->GetVelocity().Length2D() > 0)
{
flYaw = pEntity->GetLowerBodyYaw();
}
else
{
if (curYaw != lastYaw[i])
{
flYaw += lowerDelta[i];
lastYaw[i] = curYaw;
}
}
}
}
Код:
void pNormalize1(float& angle)
{
while (angle > 180.f)
{
angle -= 360.f;
}
while (angle < -180.f)
{
angle += 360.f;
}
}
Код:
for (int i = 0; i < Interfaces::EntList->GetHighestEntityIndex(); ++i)
{
IClientEntity *pEntity = Interfaces::EntList->GetClientEntity(i);
flYaw = pEntity->GetLowerBodyYaw(); //Sets entity's eye angles to their current LBY
}