Add "soundlist" keyvalue for individual sound replacements.

This commit is contained in:
Giegue
2023-04-29 02:04:40 -03:00
parent 92d14a6fd3
commit efd801bdea
8 changed files with 185 additions and 12 deletions

View File

@@ -41,7 +41,7 @@ extern CGraph WorldGraph;// the world node graph
extern cvar_t *monster_turn_coeficient;
extern void process_monster_sound(edict_t *pMonster, char *fileName);
//=========================================================
// Eat - makes a monster full for a little while.
@@ -2643,6 +2643,14 @@ void CMBaseMonster :: KeyValue( KeyValueData *pkvd )
}
pkvd->fHandled = TRUE;
}
else if (FStrEq(pkvd->szKeyName, "soundlist"))
{
if (strlen( pkvd->szValue ))
{
process_monster_sound(edict(), pkvd->szValue);
}
pkvd->fHandled = TRUE;
}
else
{
CMBaseToggle::KeyValue( pkvd );