[bot] Update CPlayerPool ctor

This commit is contained in:
RD42 2024-01-15 23:51:39 +08:00
parent 0ae5fb134b
commit 93fd944b72
2 changed files with 14 additions and 6 deletions

View File

@ -13,6 +13,7 @@
#endif
#define MAX_PLAYER_NAME 24
#define MAX_PLAYERS 1000
#define MAX_SETTINGS_STRING 256
typedef struct _GAME_SETTINGS {
@ -30,6 +31,8 @@ typedef struct _GAME_SETTINGS {
#include "../raknet/RakNetworkFactory.h"
#include "../raknet/PacketEnumerations.h"
#include "../raknet/SAMPRPC.h"
typedef unsigned short PLAYERID;
#include "scrtimers.h"
#include "npcmode.h"

View File

@ -1,14 +1,19 @@
#include "playerpool.h"
#include "../main.h"
//----------------------------------------------------
CPlayerPool::CPlayerPool()
{
// TODO: CPlayerPool::CPlayerPool W: 004196A0 L: 080B1F4E
field_7163 = 0;
field_8107 = 0;
for(unsigned short i = 0; i < 1000; i++) {
field_0[i] = 0;
field_7167[i] = 0;
field_810B[i] = 0;
// loop through and initialize all net players to null and slot states to false
for(PLAYERID playerId = 0; playerId < MAX_PLAYERS; playerId++) {
field_0[playerId] = 0;
field_7167[playerId] = 0;
field_810B[playerId] = 0;
}
}
//----------------------------------------------------