-
Автор темы
- #1
C++:
Vector player_t::get_shoot_position()
{
if (!this) //-V704
return ZERO;
auto shoot_position = m_vecOrigin() + m_vecViewOffset();
if (this != g_ctx.local()) //-V648
return shoot_position;
if (g_ctx.globals.fakeducking)
{
Vector origin = m_vecOrigin();
Vector vDuckHullMin = m_gamemovement()->GetPlayerMins(true);
Vector vStandHullMin = m_gamemovement()->GetPlayerMins(false);
float fMore = (vDuckHullMin.z - vStandHullMin.z);
Vector vecDuckViewOffset = m_gamemovement()->GetPlayerViewOffset(true);
Vector vecStandViewOffset = m_gamemovement()->GetPlayerViewOffset(false);
float duckFraction = m_flDuckAmount();
float tempz = ((vecDuckViewOffset.z - fMore) * duckFraction) +
(vecStandViewOffset.z * (1 - duckFraction));
origin.z += tempz;
return origin;
}
modify_eye_position(shoot_position);
return shoot_position;
}