feat(System/PlayerUpdate): Optimised player updates

This commit is contained in:
Yimura 2021-08-05 01:28:18 +02:00
parent 0594116528
commit 417a5d6efc
No known key found for this signature in database
GPG Key ID: 3D8FF4397E768682

View File

@ -18,7 +18,7 @@ namespace big
for (Player i = 0; i < 32; i++)
{
if (NETWORK::NETWORK_IS_PLAYER_CONNECTED(i))
if (NETWORK::NETWORK_IS_PLAYER_ACTIVE(i))
{
if (g.players[i].is_online) continue;
@ -27,9 +27,9 @@ namespace big
int iNetworkHandle[26];
NETWORK::NETWORK_HANDLE_FROM_PLAYER(i, &iNetworkHandle[0], 13);
NETWORK::NETWORK_IS_HANDLE_VALID(&iNetworkHandle[0], 13) && NETWORK::NETWORK_IS_FRIEND(&iNetworkHandle[0]);
bool is_friend = NETWORK::NETWORK_IS_HANDLE_VALID(&iNetworkHandle[0], 13) && NETWORK::NETWORK_IS_FRIEND(&iNetworkHandle[0]);
if (NETWORK::NETWORK_IS_HANDLE_VALID(iNetworkHandle, 13) && NETWORK::NETWORK_IS_FRIEND(iNetworkHandle))
if (is_friend)
{
g.players[i].is_friend = true;