NSTalkMonster: add anim event 1009.

This commit is contained in:
Marco Cawthorne 2024-03-04 18:43:17 -08:00
parent 86cfec6e6d
commit 0f96e635b0
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
1 changed files with 10 additions and 4 deletions

View File

@ -68,12 +68,18 @@ void
NSTalkMonster::HandleAnimEvent(float flTimeStamp, int iCode, string strData)
{
switch(iCode) {
#ifdef SERVER
case 1005: /* plays a dialogue sentence. monsters only right now */
NSTalkMonster targ = (NSTalkMonster)self;
targ.Sentence(strData);
break;
#ifdef SERVER
Sentence(strData);
#endif
break;
case 1009: /* play names sequence with 25% chance */
#ifdef SERVER
if (random() < 0.25) {
Sentence(strData);
}
#endif
break;
default:
super::HandleAnimEvent(flTimeStamp, iCode, strData);
}