mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-25 11:19:59 +01:00
engine: server: fix off-by-one error in Voice_Set/GetClientListening
This commit is contained in:
parent
36c2f9e9f2
commit
13aab4e59c
@ -4525,7 +4525,7 @@ static qboolean GAME_EXPORT pfnVoice_GetClientListening( int iReceiver, int iSen
|
||||
iReceiver -= 1;
|
||||
iSender -= 1;
|
||||
|
||||
if( iReceiver < 0 || iReceiver >= svs.maxclients || iSender < 0 || iSender > svs.maxclients )
|
||||
if( iReceiver < 0 || iReceiver >= svs.maxclients || iSender < 0 || iSender >= svs.maxclients )
|
||||
return false;
|
||||
|
||||
return (FBitSet( svs.clients[iSender].listeners, BIT( iReceiver )) != 0 );
|
||||
@ -4542,7 +4542,7 @@ static qboolean GAME_EXPORT pfnVoice_SetClientListening( int iReceiver, int iSen
|
||||
iReceiver -= 1;
|
||||
iSender -= 1;
|
||||
|
||||
if( iReceiver < 0 || iReceiver >= svs.maxclients || iSender < 0 || iSender > svs.maxclients )
|
||||
if( iReceiver < 0 || iReceiver >= svs.maxclients || iSender < 0 || iSender >= svs.maxclients )
|
||||
return false;
|
||||
|
||||
if( bListen ) SetBits( svs.clients[iSender].listeners, BIT( iReceiver ));
|
||||
|
Loading…
Reference in New Issue
Block a user