From e10a4d6613d9b8327d54817344f4fd8525e8050d Mon Sep 17 00:00:00 2001 From: Blixibon Date: Wed, 10 Mar 2021 02:11:39 -0600 Subject: [PATCH] Added VScript file response to base response dispatch code --- sp/src/game/server/baseentity.cpp | 9 +++++++-- sp/src/game/server/hl2/env_speaker.cpp | 9 ++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/sp/src/game/server/baseentity.cpp b/sp/src/game/server/baseentity.cpp index dff5ee7f..5302ee6a 100644 --- a/sp/src/game/server/baseentity.cpp +++ b/sp/src/game/server/baseentity.cpp @@ -9243,10 +9243,15 @@ void CBaseEntity::DispatchResponse( const char *conceptName ) CAI_Expresser::FireEntIOFromResponse(response, this); break; } -#ifdef MAPBASE +#ifdef MAPBASE_VSCRIPT case ResponseRules::RESPONSE_VSCRIPT: { - RunScript( response, "ResponseScript" ); + CAI_Expresser::RunScriptResponse( this, response, &set, false ); + break; + } + case ResponseRules::RESPONSE_VSCRIPT_FILE: + { + CAI_Expresser::RunScriptResponse( this, response, &set, true ); break; } #endif diff --git a/sp/src/game/server/hl2/env_speaker.cpp b/sp/src/game/server/hl2/env_speaker.cpp index 25a65017..ad46a25c 100644 --- a/sp/src/game/server/hl2/env_speaker.cpp +++ b/sp/src/game/server/hl2/env_speaker.cpp @@ -286,11 +286,18 @@ void CSpeaker::DispatchResponse( const char *conceptName ) CAI_Expresser::FireEntIOFromResponse( response, pTarget ); break; } +#ifdef MAPBASE_VSCRIPT case ResponseRules::RESPONSE_VSCRIPT: { - pTarget->RunScript( response, "ResponseScript" ); + CAI_Expresser::RunScriptResponse( pTarget, response, &set, false ); break; } + case ResponseRules::RESPONSE_VSCRIPT_FILE: + { + CAI_Expresser::RunScriptResponse( pTarget, response, &set, true ); + break; + } +#endif default: break; }