mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2024-12-26 06:45:31 +03:00
Fixed some issues with instanced response systems
This commit is contained in:
parent
2b1a8762bd
commit
5a11d51db4
@ -531,6 +531,9 @@ public:
|
||||
|
||||
virtual void LevelInitPostEntity()
|
||||
{
|
||||
#ifdef MAPBASE
|
||||
if (!rr_enhanced_saverestore.GetBool() || gpGlobals->eLoadType != MapLoad_Transition)
|
||||
#endif
|
||||
ResetResponseGroups();
|
||||
}
|
||||
|
||||
@ -567,6 +570,16 @@ public:
|
||||
|
||||
virtual void LevelInitPostEntity()
|
||||
{
|
||||
#ifdef MAPBASE
|
||||
// CInstancedResponseSystem is not a CAutoGameSystem, so this needs to be called manually.
|
||||
// The same could've been accomplished by making CInstancedResponseSystem derive from CAutoGameSystem,
|
||||
// but their instanced nature would've complicated things a lot.
|
||||
int c = m_InstancedSystems.Count();
|
||||
for ( int i = c - 1 ; i >= 0; i-- )
|
||||
{
|
||||
m_InstancedSystems[i]->LevelInitPostEntity();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual void Release()
|
||||
|
@ -192,6 +192,9 @@ CResponseSystem::CResponseSystem() :
|
||||
token[0] = 0;
|
||||
m_bUnget = false;
|
||||
m_bCustomManagable = false;
|
||||
#ifdef MAPBASE
|
||||
m_bInProspective = false;
|
||||
#endif
|
||||
|
||||
BuildDispatchTables();
|
||||
}
|
||||
@ -1008,11 +1011,13 @@ int CResponseSystem::SelectWeightedResponseFromResponseGroup( ResponseGroup *g,
|
||||
}
|
||||
|
||||
if ( slot != -1 )
|
||||
{
|
||||
#ifdef MAPBASE
|
||||
// Don't mark responses as used in prospective mode
|
||||
if (m_bInProspective == false)
|
||||
// Don't mark responses as used in prospective mode
|
||||
if (m_bInProspective == false)
|
||||
#endif
|
||||
g->MarkResponseUsed( slot );
|
||||
g->MarkResponseUsed( slot );
|
||||
}
|
||||
|
||||
// Revert fake depletion of unavailable choices
|
||||
RevertFakedDepletes( g );
|
||||
|
@ -58,6 +58,9 @@ namespace ResponseRules
|
||||
|
||||
bool IsCustomManagable() { return m_bCustomManagable; }
|
||||
|
||||
#ifdef MAPBASE
|
||||
virtual
|
||||
#endif
|
||||
void Clear();
|
||||
|
||||
void DumpDictionary( const char *pszName );
|
||||
|
Loading…
Reference in New Issue
Block a user