Add voice listen methods to IVEngineServer2 (#182)

This commit is contained in:
Poggu authored and GitHub committed 2023-12-07 19:35:46 +03:00
1 parent d7ed476064
commit 9363452257
4 files changed
+7 -44

No files matched your search

+1 -3
View File
@@ -22,8 +22,7 @@
class IFileSystem; // include FileSystem.h
class IUniformRandomStream; // include vstdlib/random.h
class IEngineSound; // include engine/IEngineSound.h
class IVEngineServer;
class IVoiceServer;
class IVEngineServer;
class IStaticPropMgrServer;
class ISpatialPartition;
class IVModelInfo;
@@ -40,7 +39,6 @@ class CSteamAPIContext;
class CSteamGameServerAPIContext;
extern IVEngineServer *engine;
extern IVoiceServer *g_pVoiceServer;
extern IFileSystem *filesystem;
extern IStaticPropMgrServer *staticpropmgr;
extern ISpatialPartition *partition;
-4
View File
@@ -23,7 +23,6 @@
#include "ai_saverestore.h"
#include "ai_networkmanager.h"
#include "ndebugoverlay.h"
#include "ivoiceserver.h"
#include <stdarg.h>
#include "movehelper_server.h"
#include "networkstringtable_gamedll.h"
@@ -154,7 +153,6 @@ CUtlLinkedList<CMapEntityRef, unsigned short> g_MapEntityRefs;
// Engine interfaces.
IVEngineServer *engine = NULL;
IVoiceServer *g_pVoiceServer = NULL;
#if !defined(_STATIC_LINKED)
IFileSystem *filesystem = NULL;
#else
@@ -655,8 +653,6 @@ bool CServerGameDLL::DLLInit( CreateInterfaceFn appSystemFactory,
// init each (seperated for ease of debugging)
if ( (engine = (IVEngineServer*)appSystemFactory(INTERFACEVERSION_VENGINESERVER, NULL)) == NULL )
return false;
if ( (g_pVoiceServer = (IVoiceServer*)appSystemFactory(INTERFACEVERSION_VOICESERVER, NULL)) == NULL )
return false;
if ( (networkstringtable = (INetworkStringTableContainer *)appSystemFactory(INTERFACENAME_NETWORKSTRINGTABLESERVER,NULL)) == NULL )
return false;
if ( (staticpropmgr = (IStaticPropMgrServer *)appSystemFactory(INTERFACEVERSION_STATICPROPMGR_SERVER,NULL)) == NULL )
+6 -3
View File
@@ -313,9 +313,12 @@ public:
virtual void unk101() = 0;
virtual void unk102() = 0;
virtual void unk103() = 0;
virtual void unk104() = 0;
virtual void unk105() = 0;
// Use these to setup who can hear whose voice.
// Pass in client indices (which are their ent indices - 1).
virtual bool GetClientListening(CPlayerSlot iReceiver, CPlayerSlot iSender) = 0;
virtual bool SetClientListening(CPlayerSlot iReceiver, CPlayerSlot iSender, bool bListen) = 0;
virtual bool SetClientProximity(CPlayerSlot iReceiver, CPlayerSlot iSender, bool bUseProximity) = 0;
virtual void unk106() = 0;
virtual void unk107() = 0;
-34
View File
@@ -1,34 +0,0 @@
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose: This module defines the IVoiceServer interface, which is used by
// game code to control which clients are listening to which other
// clients' voice streams.
//
// $NoKeywords: $
//=============================================================================//
#ifndef IVOICESERVER_H
#define IVOICESERVER_H
#include "interface.h"
#define INTERFACEVERSION_VOICESERVER "VoiceServer002"
abstract_class IVoiceServer
{
public:
virtual ~IVoiceServer() {}
// Use these to setup who can hear whose voice.
// Pass in client indices (which are their ent indices - 1).
virtual bool GetClientListening(int iReceiver, int iSender) = 0;
virtual bool SetClientListening(int iReceiver, int iSender, bool bListen) = 0;
virtual bool SetClientProximity(int iReceiver, int iSender, bool bUseProximity) = 0;
};
#endif