Added env_message_single(), this will probably be merged/removed later.
This commit is contained in:
parent
4029e92713
commit
6f7c7c7b1e
1 changed files with 14 additions and 1 deletions
|
@ -30,7 +30,7 @@ is set. An optional sound effect can be supplied as well.
|
|||
enumflags
|
||||
{
|
||||
EMF_ONCE,
|
||||
EMF_ALLPLAYERS
|
||||
EMF_ALLPLAYERS
|
||||
};
|
||||
|
||||
class env_message:CBaseTrigger
|
||||
|
@ -92,3 +92,16 @@ void env_message::env_message(void)
|
|||
CBaseTrigger::CBaseTrigger();
|
||||
env_message::Respawn();
|
||||
}
|
||||
|
||||
void
|
||||
env_message_single(entity target, string msg)
|
||||
{
|
||||
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
|
||||
WriteByte(MSG_MULTICAST, EV_MESSAGE);
|
||||
WriteString(MSG_MULTICAST, msg);
|
||||
WriteString(MSG_MULTICAST, "misc/talk.wav");
|
||||
WriteFloat(MSG_MULTICAST, 1.0);
|
||||
WriteByte(MSG_MULTICAST, ATTN_NORM);
|
||||
msg_entity = target;
|
||||
multicast([0,0,0], MULTICAST_ONE_R);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue