public static void HuntTarget(edict_t self) { float[] vec = new[] { 0f, 0f, 0f }; self.goalentity = self.enemy; if ((self.monsterinfo.aiflags & Defines.AI_STAND_GROUND) != 0) { self.monsterinfo.stand.Think(self); } else { self.monsterinfo.run.Think(self); } Math3D.VectorSubtract(self.enemy.s.origin, self.s.origin, vec); self.ideal_yaw = Math3D.Vectoyaw(vec); if (0 == (self.monsterinfo.aiflags & Defines.AI_STAND_GROUND)) { GameUtil.AttackFinished(self, 1); } }