Skip to content

Commit

Permalink
Remove CNetMsgScriptHelper multiplayer recipient functions
Browse files Browse the repository at this point in the history
  • Loading branch information
samisalreadytaken committed Feb 18, 2022
1 parent 7701a92 commit bdd338f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 39 deletions.
33 changes: 2 additions & 31 deletions sp/src/game/shared/mapbase/vscript_singletons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1667,32 +1667,6 @@ void CNetMsgScriptHelper::DispatchUserMessage( const char *msg )
}
#endif // GAME_DLL

#ifdef GAME_DLL
void CNetMsgScriptHelper::AddRecipient( HSCRIPT player )
{
CBaseEntity *pPlayer = ToEnt(player);
if ( pPlayer )
{
m_filter.AddRecipient( (CBasePlayer*)pPlayer );
}
}

void CNetMsgScriptHelper::AddRecipientsByPVS( const Vector &pos )
{
m_filter.AddRecipientsByPVS(pos);
}

void CNetMsgScriptHelper::AddRecipientsByPAS( const Vector &pos )
{
m_filter.AddRecipientsByPAS(pos);
}

void CNetMsgScriptHelper::AddAllPlayers()
{
m_filter.AddAllPlayers();
}
#endif // GAME_DLL

void CNetMsgScriptHelper::WriteInt( int iValue, int bits )
{
SCRIPT_NETMSG_WRITE_FUNC
Expand Down Expand Up @@ -1950,11 +1924,8 @@ BEGIN_SCRIPTDESC_ROOT_NAMED( CNetMsgScriptHelper, "CNetMsg", SCRIPT_SINGLETON "N
#ifdef GAME_DLL
DEFINE_SCRIPTFUNC( SendUserMessage, "Send a usermessage from the server to the client" )
DEFINE_SCRIPTFUNC( SendEntityMessage, "Send a message from a server side entity to its client side counterpart" )
DEFINE_SCRIPTFUNC( AddRecipient, "" )
//DEFINE_SCRIPTFUNC( RemoveRecipient, "" )
DEFINE_SCRIPTFUNC( AddRecipientsByPVS, "" )
DEFINE_SCRIPTFUNC( AddRecipientsByPAS, "" )
DEFINE_SCRIPTFUNC( AddAllPlayers, "" )

// TODO: multiplayer
#else
DEFINE_SCRIPTFUNC( DispatchUserMessage, "Dispatch a usermessage on client" )
#endif
Expand Down
8 changes: 0 additions & 8 deletions sp/src/game/shared/mapbase/vscript_singletons.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,6 @@ class CNetMsgScriptHelper
void DispatchUserMessage( const char *msg );
#endif

#ifdef GAME_DLL
public:
void AddRecipient( HSCRIPT player );
void AddRecipientsByPVS( const Vector &pos );
void AddRecipientsByPAS( const Vector &pos );
void AddAllPlayers();
#endif // GAME_DLL

public:
void WriteInt( int iValue, int bits );
void WriteUInt( int iValue, int bits );
Expand Down

0 comments on commit bdd338f

Please sign in to comment.