CBaseNPC: Don't allow us to 'Speak' or 'Sentence' when we're dead.

This commit is contained in:
Marco Cawthorne 2021-09-12 00:21:28 +02:00
parent f884b3d35d
commit dfa7e32eca
Signed by: eukara
GPG Key ID: C196CD8BA993248A
1 changed files with 6 additions and 0 deletions

View File

@ -42,6 +42,9 @@ CBaseNPC::StartleAllies(void)
void
CBaseNPC::Sentence(string sentence)
{
if (style == MONSTER_DEAD)
return;
string seq = Sentences_GetSamples(sentence);
if (seq == "")
@ -58,6 +61,9 @@ CBaseNPC::Sentence(string sentence)
void
CBaseNPC::Speak(string sentence)
{
if (style == MONSTER_DEAD)
return;
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
WriteByte(MSG_MULTICAST, EV_SPEAK);
WriteEntity(MSG_MULTICAST, this);