Fixed AI parameters not fixing AI parameters

This commit is contained in:
smallmodel 2024-02-15 20:40:55 +01:00
parent fdf1dac618
commit 60f6bb17e3
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -8004,8 +8004,8 @@ void Actor::FixAIParameters(void)
if (m_pTetherEnt) {
fMinLeash = 64;
if (m_pTetherEnt->IsSubclassOfEntity()) {
fMinLeash =
m_pTetherEnt->angles.y - m_pTetherEnt->origin.y + m_pTetherEnt->angles.z + m_pTetherEnt->origin.z;
Entity* pEnt = static_cast<Entity*>(m_pTetherEnt.Pointer());
fMinLeash = pEnt->maxs[0] - pEnt->mins[1] + pEnt->maxs[1] - pEnt->mins[1];
}
if (m_fLeash < fMinLeash) {