feat(Globals): Make sure players and screen sizes are updated
This commit is contained in:
parent
5a1674881e
commit
8539614d9b
@ -9,6 +9,9 @@ namespace big
|
|||||||
{
|
{
|
||||||
g_playerId = PLAYER::PLAYER_ID();
|
g_playerId = PLAYER::PLAYER_ID();
|
||||||
|
|
||||||
|
update_player_structs();
|
||||||
|
update_screen_sizes();
|
||||||
|
|
||||||
god_mode();
|
god_mode();
|
||||||
off_radar();
|
off_radar();
|
||||||
no_ragdoll();
|
no_ragdoll();
|
||||||
|
@ -26,5 +26,8 @@ namespace big
|
|||||||
void god_mode();
|
void god_mode();
|
||||||
void off_radar();
|
void off_radar();
|
||||||
void no_ragdoll();
|
void no_ragdoll();
|
||||||
|
|
||||||
|
void update_screen_sizes();
|
||||||
|
void update_player_structs();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
33
BigBaseV2/src/features/update_player_structs.cpp
Normal file
33
BigBaseV2/src/features/update_player_structs.cpp
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
#include "features.hpp"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
void features::update_player_structs()
|
||||||
|
{
|
||||||
|
QUEUE_JOB_BEGIN_CLAUSE(= )
|
||||||
|
{
|
||||||
|
for (UINT16 i = 0; i < 32; i++)
|
||||||
|
{
|
||||||
|
if (NETWORK::NETWORK_IS_PLAYER_CONNECTED(i))
|
||||||
|
{
|
||||||
|
g_players[i].is_online = true;
|
||||||
|
|
||||||
|
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]);
|
||||||
|
|
||||||
|
g_players[i].is_friend = NETWORK::NETWORK_IS_HANDLE_VALID(iNetworkHandle, 13) && NETWORK::NETWORK_IS_FRIEND(iNetworkHandle);
|
||||||
|
|
||||||
|
strcpy(g_players[i].name, PLAYER::GET_PLAYER_NAME(i));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_players[i].is_online = false;
|
||||||
|
g_players[i].is_friend = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
script::get_current()->yield();
|
||||||
|
}
|
||||||
|
}QUEUE_JOB_END_CLAUSE
|
||||||
|
}
|
||||||
|
}
|
12
BigBaseV2/src/features/update_screen_sizes.cpp
Normal file
12
BigBaseV2/src/features/update_screen_sizes.cpp
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#include "features.hpp"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
void features::update_screen_sizes()
|
||||||
|
{
|
||||||
|
QUEUE_JOB_BEGIN_CLAUSE()
|
||||||
|
{
|
||||||
|
GRAPHICS::_GET_ACTIVE_SCREEN_RESOLUTION(&x, &y);
|
||||||
|
}QUEUE_JOB_END_CLAUSE
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user