Начинающий
-
Автор темы
- #1
if (pl_records[e->EntIndex()].size() >= 2) {
auto prev_record = &pl_records[e->EntIndex()].at(1) ? &pl_records[e->EntIndex()].at(1) : rec;
if (prev_record && prev_record->angles.y != rec->angles.y)
eye_ang.z = Math::NormalizedVec(Math::NormalizedVec(rec->angles) - Math::NormalizedVec(prev_record->angles)).y;
}
so just discovered that roll is affected by yaw.
you can see this yourself by just updating animstate angle and not hooking eye angles.
you will have roll if your animstate angle is different from 0 or 180.
so i just figured out i can easily resolve it by calculating the delta from last yaw and current yaw.
tested with a friend on a hvh server and i could actually hit it with this code.
if the enemy clamps their roll angle this code is useless.
enjoy!
auto prev_record = &pl_records[e->EntIndex()].at(1) ? &pl_records[e->EntIndex()].at(1) : rec;
if (prev_record && prev_record->angles.y != rec->angles.y)
eye_ang.z = Math::NormalizedVec(Math::NormalizedVec(rec->angles) - Math::NormalizedVec(prev_record->angles)).y;
}
so just discovered that roll is affected by yaw.
you can see this yourself by just updating animstate angle and not hooking eye angles.
you will have roll if your animstate angle is different from 0 or 180.
so i just figured out i can easily resolve it by calculating the delta from last yaw and current yaw.
tested with a friend on a hvh server and i could actually hit it with this code.
if the enemy clamps their roll angle this code is useless.
enjoy!
Последнее редактирование: