[bot] Update CVehiclePool ctor

This commit is contained in:
RD42 2024-01-15 23:52:08 +08:00
parent 93fd944b72
commit 7e0bd528fa
2 changed files with 11 additions and 4 deletions

View File

@ -14,6 +14,7 @@
#define MAX_PLAYER_NAME 24 #define MAX_PLAYER_NAME 24
#define MAX_PLAYERS 1000 #define MAX_PLAYERS 1000
#define MAX_VEHICLES 2000
#define MAX_SETTINGS_STRING 256 #define MAX_SETTINGS_STRING 256
typedef struct _GAME_SETTINGS { typedef struct _GAME_SETTINGS {
@ -33,6 +34,8 @@ typedef struct _GAME_SETTINGS {
#include "../raknet/SAMPRPC.h" #include "../raknet/SAMPRPC.h"
typedef unsigned short PLAYERID; typedef unsigned short PLAYERID;
typedef unsigned short VEHICLEID;
#include "scrtimers.h" #include "scrtimers.h"
#include "npcmode.h" #include "npcmode.h"

View File

@ -1,10 +1,14 @@
#include "vehiclepool.h" #include "../main.h"
//----------------------------------------------------
CVehiclePool::CVehiclePool() CVehiclePool::CVehiclePool()
{ {
// TODO: CVehiclePool::CVehiclePool W: 0041A890 L: 080B9408 // loop through and initialize all net players to null and slot states to false
for(unsigned short i = 0; i < 2000; i++) { for(VEHICLEID VehicleID = 0; VehicleID < MAX_VEHICLES; VehicleID++) {
field_84D0[i] = 0; field_84D0[VehicleID] = 0;
} }
} }
//----------------------------------------------------