some optimizations to goal finding

This commit is contained in:
Dmitry 2015-06-09 22:16:08 +03:00
commit 73f21591f9
6 changed files with 130 additions and 144 deletions

View file

@ -997,11 +997,13 @@ void Touch (edict_t *pentTouched, edict_t *pentOther)
// the two entities both have velocities, for example two players colliding, this function
// is called twice, once for each entity moving.
Bot *touched = g_botManager->GetBot (pentTouched);
if (touched != NULL)
touched->VerifyBreakable (pentOther);
if (!IsEntityNull (pentTouched) && (pentTouched->v.flags & FL_FAKECLIENT))
{
Bot *touched = g_botManager->GetBot (pentTouched);
if (touched != NULL)
touched->VerifyBreakable (pentOther);
}
if (g_isMetamod)
RETURN_META (MRES_IGNORED);