- Copied railgun sound fix from Skulltag.

- Made infighting a level flag. The old method still exists but the level flags
  will take precedence if set.



SVN r532 (trunk)
This commit is contained in:
Christoph Oelckers 2007-05-20 11:08:36 +00:00
commit f4dcfad331
9 changed files with 60 additions and 13 deletions

View file

@ -1241,10 +1241,15 @@ bool AActor::OkayToSwitchTarget (AActor *other)
{ // [RH] Friendlies don't target other friendlies
return false;
}
if ((gameinfo.gametype == GAME_Strife || infighting < 0) &&
other->player == NULL && !IsHostile (other))
int infight;
if (level.flags & LEVEL_TOTALINFIGHTING) infight=1;
else if (level.flags & LEVEL_NOINFIGHTING) infight=-1;
else infight = infighting;
if (infight < 0 && other->player == NULL && !IsHostile (other))
{
return false; // Strife & infighting off: Non-friendlies don't target other non-friendlies
return false; // infighting off: Non-friendlies don't target other non-friendlies
}
if (TIDtoHate != 0 && TIDtoHate == other->TIDtoHate)
return false; // [RH] Don't target "teammates"