- Added AActor::SetFriendPlayer() to make setting FriendPlayer cleaner to read when doing it with

a player_t pointer.

SVN r3681 (trunk)
This commit is contained in:
Randy Heit 2012-06-09 04:15:56 +00:00
commit 086d0a797e
8 changed files with 28 additions and 49 deletions

View file

@ -532,13 +532,9 @@ AActor *P_SpawnSubMissile (AActor *source, const PClass *type, AActor *target)
{
other->FriendPlayer = source->FriendPlayer;
}
else if (target->player != NULL)
{
other->FriendPlayer = int(target->player - players) + 1;
}
else
{
other->FriendPlayer = 0;
other->SetFriendPlayer(target->player);
}
}
@ -925,7 +921,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireSigil1)
}
if (spot != NULL)
{
spot->FriendPlayer = int(player-players)+1;
spot->SetFriendPlayer(player);
spot->target = self;
}
}