Skip to content

Commit f207e5d

Browse files
committed
1 parent 2a3a814 commit f207e5d

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

game/quiver/info_changelog.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ Added the following Source SDK Pull Requests:
7979
- #1520: Add ForceDifficultyBasedAim CTFBot flag to allow MvM missions to let Spies aim better
8080
- #1522: Fix Thermal Thruster particles
8181
- #1524: Fix Eureka Effect menu reopening
82+
- #1526: Fix Client Crashes from Invalid Banner model indexes
83+
- #1525: Add more functionality to Input<name>() callback in VScript
8284

8385
Details:
8486
- Fixed a bug where the mini-crit damage effect doesn't show up when your shield breaks.

src/game/server/baseentity.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4557,9 +4557,19 @@ bool CBaseEntity::AcceptInput( const char *szInputName, CBaseEntity *pActivator,
45574557
g_pScriptVM->SetValue( "activator", ( pActivator ) ? ScriptVariant_t( pActivator->GetScriptInstance() ) : SCRIPT_VARIANT_NULL );
45584558
g_pScriptVM->SetValue( "caller", ( pCaller ) ? ScriptVariant_t( pCaller->GetScriptInstance() ) : SCRIPT_VARIANT_NULL );
45594559

4560+
#ifdef BDSBASE
4561+
g_pScriptVM->SetValue("input_value", Value.String());
4562+
#endif
4563+
45604564
if( CallScriptFunction( szScriptFunctionName, &functionReturn ) )
45614565
{
45624566
bCallInputFunc = functionReturn;
4567+
#ifdef BDSBASE
4568+
// Allow reassignment of activator and caller of the input
4569+
IScriptVM* pVM = g_pScriptVM;
4570+
pVM->IfHas<HSCRIPT>(m_ScriptScope, "activator", [&](HSCRIPT value) { data.pActivator = ToEnt(value); });
4571+
pVM->IfHas<HSCRIPT>(m_ScriptScope, "caller", [&](HSCRIPT value) { data.pCaller = ToEnt(value); });
4572+
#endif
45634573
}
45644574
}
45654575

@@ -4572,6 +4582,9 @@ bool CBaseEntity::AcceptInput( const char *szInputName, CBaseEntity *pActivator,
45724582
{
45734583
g_pScriptVM->ClearValue( "activator" );
45744584
g_pScriptVM->ClearValue( "caller" );
4585+
#ifdef BDSBASE
4586+
g_pScriptVM->ClearValue("input_value");
4587+
#endif
45754588
}
45764589
}
45774590
else if ( dmap->dataDesc[i].flags & FTYPEDESC_KEY )

0 commit comments

Comments
 (0)