CBaseNPC: Add support for 'UseSentence' and 'UnUseSentence' to specify custom sentences.txt entries for an NPC. This is used in t0a0d.
This commit is contained in:
parent
a7e1b3cfd9
commit
7b0d646020
1 changed files with 17 additions and 0 deletions
|
@ -95,6 +95,7 @@ class CBaseNPC:CBaseMonster
|
|||
virtual void(void) TalkUnfollow;
|
||||
virtual void(void) TalkFollow;
|
||||
virtual void(void) TalkStopFollow;
|
||||
virtual void(string, string) SpawnKey;
|
||||
};
|
||||
|
||||
void
|
||||
|
@ -548,6 +549,22 @@ CBaseNPC::PlayerUse(void)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
CBaseNPC::SpawnKey(string strKey, string strValue)
|
||||
{
|
||||
switch (strKey) {
|
||||
case "UnUseSentence":
|
||||
m_talkUnfollow = strcat("!", strValue);
|
||||
break;
|
||||
case "UseSentence":
|
||||
m_talkFollow = strcat("!", strValue);
|
||||
break;
|
||||
default:
|
||||
CBaseMonster::SpawnKey(strKey, strValue);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CBaseNPC::Hide(void)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue