diff --git a/sp/src/game/server/ai_basenpc.cpp b/sp/src/game/server/ai_basenpc.cpp index a7d7383b..d6d2a237 100644 --- a/sp/src/game/server/ai_basenpc.cpp +++ b/sp/src/game/server/ai_basenpc.cpp @@ -14873,23 +14873,29 @@ void CAI_BaseNPC::ParseScriptedNPCInteractions(void) else if (!Q_strncmp(szName, "their_", 6)) { - szName += 6; + const char *szTheirName = szName + 6; sInteraction.bHasSeparateSequenceNames = true; - if (!Q_strncmp(szName, "entry_sequence", 14)) + if (!Q_strncmp(szTheirName, "entry_sequence", 14)) sInteraction.sTheirPhases[SNPCINT_ENTRY].iszSequence = AllocPooledString(szValue); - else if (!Q_strncmp(szName, "entry_activity", 14)) + else if (!Q_strncmp(szTheirName, "entry_activity", 14)) sInteraction.sTheirPhases[SNPCINT_ENTRY].iActivity = GetOrRegisterActivity(szValue); - else if (!Q_strncmp(szName, "sequence", 8)) + else if (!Q_strncmp(szTheirName, "sequence", 8)) sInteraction.sTheirPhases[SNPCINT_SEQUENCE].iszSequence = AllocPooledString(szValue); - else if (!Q_strncmp(szName, "activity", 8)) + else if (!Q_strncmp(szTheirName, "activity", 8)) sInteraction.sTheirPhases[SNPCINT_SEQUENCE].iActivity = GetOrRegisterActivity(szValue); - else if (!Q_strncmp(szName, "exit_sequence", 13)) + else if (!Q_strncmp(szTheirName, "exit_sequence", 13)) sInteraction.sTheirPhases[SNPCINT_EXIT].iszSequence = AllocPooledString(szValue); - else if (!Q_strncmp(szName, "exit_activity", 13)) + else if (!Q_strncmp(szTheirName, "exit_activity", 13)) sInteraction.sTheirPhases[SNPCINT_EXIT].iActivity = GetOrRegisterActivity(szValue); + + // Add anything else to our miscellaneous criteria + else + { + szCriteria = UTIL_VarArgs("%s,%s:%s", szCriteria, szName, szValue); + } } else if (!Q_strncmp(szName, "delay", 5))