Integrating vscript interface code (based on Alien Swarm)

This commit is contained in:
James Mitchell
2020-05-04 16:25:15 +10:00
parent af85131deb
commit d840c57b4a
53 changed files with 5128 additions and 134 deletions

View File

@@ -1217,6 +1217,19 @@ void CBaseEntity::EmitSound( const char *soundname, HSOUNDSCRIPTHANDLE& handle,
EmitSound( filter, entindex(), params, handle );
}
#if !defined ( CLIENT_DLL )
void CBaseEntity::ScriptEmitSound( const char *soundname )
{
EmitSound( soundname );
}
float CBaseEntity::ScriptSoundDuration( const char *soundname, const char *actormodel )
{
float duration = CBaseEntity::GetSoundDuration( soundname, actormodel );
return duration;
}
#endif // !CLIENT
//-----------------------------------------------------------------------------
// Purpose:
// Input : filter -
@@ -1486,6 +1499,14 @@ HSOUNDSCRIPTHANDLE CBaseEntity::PrecacheScriptSound( const char *soundname )
#endif
}
#if !defined ( CLIENT_DLL )
// Same as server version of above, but signiture changed so it can be deduced by the macros
void CBaseEntity::VScriptPrecacheScriptSound(const char* soundname)
{
g_SoundEmitterSystem.PrecacheScriptSound(soundname);
}
#endif // !CLIENT_DLL
void CBaseEntity::PrefetchScriptSound( const char *soundname )
{
g_SoundEmitterSystem.PrefetchScriptSound( soundname );