Fix "their_" misc criteria not being registered

This commit is contained in:
ALLEN-PC\acj30 2024-01-05 14:33:33 -06:00
parent 3861c6a742
commit 14675578a8

View File

@ -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))