- 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

@ -168,7 +168,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_M_Refire)
{
if (self->MissileState && pr_m_refire() < 160)
{ // Look for a new target most of the time
if (P_LookForPlayers (self, true) && P_CheckMissileRange (self))
if (P_LookForPlayers (self, true, NULL) && P_CheckMissileRange (self))
{ // Found somebody new and in range, so don't stop shooting
return;
}