mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-14 07:47:55 +03:00
Stabilized implementation of some Mapbase code in the new response system
This commit is contained in:
parent
efec7ab4db
commit
8966462fee
@ -974,7 +974,28 @@ bool LoadResponseSystemFile(const char *scriptfile)
|
||||
delete rs;
|
||||
*/
|
||||
|
||||
defaultresponsesytem.LoadFromBuffer(scriptfile, (const char *)buf.PeekGet());
|
||||
// HACKHACK: This is not very efficient
|
||||
/*
|
||||
CInstancedResponseSystem *tempSys = new CInstancedResponseSystem( scriptfile );
|
||||
if ( tempSys && tempSys->Init() )
|
||||
{
|
||||
tempSys->Precache();
|
||||
|
||||
for ( ResponseRulePartition::tIndex idx = tempSys->m_RulePartitions.First() ;
|
||||
tempSys->m_RulePartitions.IsValid(idx) ;
|
||||
idx = tempSys->m_RulePartitions.Next(idx) )
|
||||
{
|
||||
Rule &rule = tempSys->m_RulePartitions[idx];
|
||||
tempSys->CopyRuleFrom( &rule, idx, &defaultresponsesytem );
|
||||
}
|
||||
|
||||
tempSys->Release();
|
||||
}
|
||||
*/
|
||||
|
||||
// HACKHACK: This is even less efficient
|
||||
defaultresponsesytem.LoadFromBuffer( scriptfile, (const char *)buf.PeekGet() );
|
||||
defaultresponsesytem.Precache();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -111,7 +111,9 @@ namespace ResponseRules
|
||||
// CResponseSystem::BuildDispatchTables() - AI_ResponseSystem.cpp (with their own funcs for m_RuleDispatch)
|
||||
// CRR_Response::Describe() - rr_response.cpp
|
||||
// CAI_Expresser::SpeakDispatchResponse() - ai_speech.cpp
|
||||
enum
|
||||
//
|
||||
// Also mind that this is 8-bit
|
||||
enum : uint8
|
||||
{
|
||||
APPLYCONTEXT_SELF = (1 << 0), // Included for contexts that apply to both self and something else
|
||||
APPLYCONTEXT_WORLD = (1 << 1), // Apply to world
|
||||
|
@ -340,7 +340,8 @@ namespace ResponseRules
|
||||
uint8 m_nForceWeight;
|
||||
|
||||
#ifdef MAPBASE
|
||||
int m_iContextFlags;
|
||||
// TODO: Could this cause any issues with the code optimization?
|
||||
uint8 m_iContextFlags;
|
||||
#else
|
||||
bool m_bApplyContextToWorld : 1;
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user