- Added some pieces of MBF's friendly AI.

- Cleaned up A_LookEx code and merged most of it with the base functions.
  The major difference was a common piece of code that was repeated 5 times
  throughout the code so I moved it into a subfunction.
- Changed P_BlockmapSearch to pass a user parameter to its callback so that
  A_LookEx does not need to store its info inside the actor itself.


SVN r1846 (trunk)
This commit is contained in:
Christoph Oelckers 2009-09-16 15:54:04 +00:00
commit dc292caaa3
15 changed files with 755 additions and 1347 deletions

View file

@ -238,7 +238,7 @@ static void SpawnFly(AActor *self, const PClass *spawntype, FSoundID sound)
{
newmobj->CopyFriendliness (eye, false);
}
if (newmobj->SeeState != NULL && P_LookForPlayers (newmobj, true))
if (newmobj->SeeState != NULL && P_LookForPlayers (newmobj, true, NULL))
newmobj->SetState (newmobj->SeeState);
if (!(newmobj->ObjectFlags & OF_EuthanizeMe))