- removed the playernum parameter from CheckLocalView

This was always used with 'consoleplayer' which really is the only thing making sense here. But this is a part of the global state which should be avoided in play code.

In particular, this makes no real sense in case of secondary maps where it should always return false.
This commit is contained in:
Christoph Oelckers 2019-01-31 03:29:25 +01:00
commit ddab2c3e78
18 changed files with 50 additions and 61 deletions

View file

@ -224,7 +224,7 @@ bool AnnounceKill (AActor *killer, AActor *killee)
if (cl_bbannounce && deathmatch)
{
bool playSound = killee->CheckLocalView (consoleplayer);
bool playSound = killee->CheckLocalView();
if (killer == NULL)
{ // The world killed the player
@ -258,7 +258,7 @@ bool AnnounceKill (AActor *killer, AActor *killee)
// Blood only plays the announcement sound on the killer's
// computer. I think it sounds neater to also hear it on
// the killee's machine.
playSound |= killer->CheckLocalView (consoleplayer);
playSound |= killer->CheckLocalView();
}
message = GStrings(choice->Message);
@ -302,8 +302,8 @@ bool AnnounceTelefrag (AActor *killer, AActor *killee)
killee->player->userinfo.GetName(), killer->player->userinfo.GetName());
Printf (PRINT_MEDIUM, "%s\n", assembled);
}
if (killee->CheckLocalView (consoleplayer) ||
killer->CheckLocalView (consoleplayer))
if (killee->CheckLocalView() ||
killer->CheckLocalView())
{
DoVoiceAnnounce (TelefragSounds[rannum % 7]);
}
@ -337,7 +337,7 @@ bool AnnounceSpreeLoss (AActor *who)
{
if (cl_bbannounce)
{
if (who->CheckLocalView (consoleplayer))
if (who->CheckLocalView())
{
DoVoiceAnnounce (TooBadSounds[M_Random() % 3]);
}
@ -357,7 +357,7 @@ bool AnnounceMultikill (AActor *who)
{
if (cl_bbannounce)
{
if (who->CheckLocalView (consoleplayer))
if (who->CheckLocalView())
{
DoVoiceAnnounce (GoodJobSounds[M_Random() % 3]);
}