- moved the notification messages for SendToCommunicator into LANGUAGE.
As a side effect this will now allow using custom messages with this function as well by using the arg2 parameter as part of the message's name (arg2=0 will use TXT_COMM0, arg1 TXT_COMM1 and so on.)
This commit is contained in:
parent
6efc2a0ec7
commit
fca469b053
2 changed files with 12 additions and 6 deletions
|
|
@ -56,6 +56,7 @@
|
|||
#include "p_3dmidtex.h"
|
||||
#include "d_net.h"
|
||||
#include "d_event.h"
|
||||
#include "gstrings.h"
|
||||
#include "r_data/colormaps.h"
|
||||
|
||||
#define FUNC(a) static int a (line_t *ln, AActor *it, bool backSide, \
|
||||
|
|
@ -2985,13 +2986,14 @@ FUNC(LS_SendToCommunicator)
|
|||
{
|
||||
S_StopSound (CHAN_VOICE);
|
||||
S_Sound (CHAN_VOICE, name, 1, ATTN_NORM);
|
||||
if (arg2 == 0)
|
||||
|
||||
// Get the message from the LANGUAGE lump.
|
||||
FString msg;
|
||||
msg.Format("TXT_COMM%d", arg2);
|
||||
const char *str = GStrings[msg];
|
||||
if (msg != NULL)
|
||||
{
|
||||
Printf (PRINT_CHAT, "Incoming Message\n");
|
||||
}
|
||||
else if (arg2 == 1)
|
||||
{
|
||||
Printf (PRINT_CHAT, "Incoming Message from BlackBird\n");
|
||||
Printf (PRINT_CHAT, "%s\n", str);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue