mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2026-10-10 03:43:06 +08:00
BMS EmitGameSound crash fix (#404)
* Added second bool value for CServerGameClients::ClientActive I have no idea why it exists, doesn't seem to be used, Crowbar Collective... * EmitSound Windows crash for Black Mesa this was caused mainly by lack of vars bmp, signature, fadetime here is some info https://developer.valvesoftware.com/wiki/Music_track
This commit is contained in:
@@ -2623,7 +2623,7 @@ bool CServerGameClients::ClientConnect( edict_t *pEdict, const char *pszName, co
|
||||
// Purpose: Called when a player is fully active (i.e. ready to receive messages)
|
||||
// Input : *pEntity - the player
|
||||
//-----------------------------------------------------------------------------
|
||||
void CServerGameClients::ClientActive( edict_t *pEdict, bool bLoadGame )
|
||||
void CServerGameClients::ClientActive( edict_t *pEdict, bool bLoadGame, bool bUnknown)
|
||||
{
|
||||
MDLCACHE_CRITICAL_SECTION();
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ class CServerGameClients : public IServerGameClients
|
||||
{
|
||||
public:
|
||||
virtual bool ClientConnect( edict_t *pEntity, char const* pszName, char const* pszAddress, char *reject, int maxrejectlen ) OVERRIDE;
|
||||
virtual void ClientActive( edict_t *pEntity, bool bLoadGame ) OVERRIDE;
|
||||
virtual void ClientActive( edict_t *pEntity, bool bLoadGame, bool bUnknown ) OVERRIDE;
|
||||
virtual void ClientDisconnect( edict_t *pEntity ) OVERRIDE;
|
||||
virtual void ClientPutInServer( edict_t *pEntity, const char *playername ) OVERRIDE;
|
||||
virtual void ClientCommand( edict_t *pEntity, const CCommand &args ) OVERRIDE;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "soundflags.h"
|
||||
#include "mathlib/compressed_vector.h"
|
||||
#include "appframework/IAppSystem.h"
|
||||
#include "stddef.h"
|
||||
|
||||
|
||||
#define SOUNDEMITTERSYSTEM_INTERFACE_VERSION "VSoundEmitter002"
|
||||
@@ -43,11 +44,16 @@ struct CSoundParameters
|
||||
pitchhigh = PITCH_NORM;
|
||||
|
||||
soundlevel = SNDLVL_NORM; // 75dB
|
||||
soundname[ 0 ] = 0;
|
||||
play_to_owner_only = false;
|
||||
count = 0;
|
||||
count = 0;
|
||||
soundname[ 0 ] = 0;
|
||||
|
||||
delay_msec = 0;
|
||||
|
||||
//for some info on these, read https://developer.valvesoftware.com/wiki/Music_track
|
||||
m_fBPM = 0.0f;
|
||||
m_fSignature = 0.0f;
|
||||
m_fFadeTime = 0.0f;
|
||||
}
|
||||
|
||||
int channel;
|
||||
@@ -60,8 +66,14 @@ struct CSoundParameters
|
||||
int count;
|
||||
char soundname[ 128 ];
|
||||
int delay_msec;
|
||||
|
||||
float m_fBPM; //0xA4
|
||||
float m_fSignature; //0xA8
|
||||
float m_fFadeTime; //0xAC
|
||||
};
|
||||
|
||||
COMPILE_TIME_ASSERT(sizeof(CSoundParameters) == 0xB0); //this is the size we must have
|
||||
|
||||
// A bit of a hack, but these are just utility function which are implemented in the SouneParametersInternal.cpp file which all users of this lib also compile
|
||||
const char *SoundLevelToString( soundlevel_t level );
|
||||
const char *ChannelToString( int channel );
|
||||
|
||||
+1
-1
@@ -693,7 +693,7 @@ public:
|
||||
|
||||
// Client is going active
|
||||
// If bLoadGame is true, don't spawn the player because its state is already setup.
|
||||
virtual void ClientActive( edict_t *pEntity, bool bLoadGame ) = 0;
|
||||
virtual void ClientActive(edict_t* pEntity, bool bLoadGame, bool bUnknown) = 0;
|
||||
|
||||
// Client is disconnecting from server
|
||||
virtual void ClientDisconnect( edict_t *pEntity ) = 0;
|
||||
|
||||
Reference in New Issue
Block a user