AI, HuntTarget fix runtime warning.

`Conditional jump or move depends on unitialised value(s)...HuntTarget
(g_ai.c:423)...`
This commit is contained in:
David Carlier 2024-08-17 15:55:24 +01:00
parent a26c496038
commit d7dd4e40a4
No known key found for this signature in database
GPG key ID: CEF290BB40D2086B

View file

@ -419,6 +419,10 @@ HuntTarget(edict_t *self)
{
VectorSubtract(self->enemy->s.origin, self->s.origin, vec);
}
else
{
VectorClear(vec);
}
self->ideal_yaw = vectoyaw(vec);