实体

拾取物 CPickups

生成删除拾取物与撒钱

CPickups.h

逻辑帧创建 / 删除;handle 跨帧存 int。

生成拾取物

GenerateNewOne / GenerateNewOne_WeaponType

返回 handle。

static int GenerateNewOne(CVector coors, unsigned int modelId, unsigned char pickupType,
    unsigned int ammo, unsigned int moneyPerDay, bool isEmpty, char* message);
static int GenerateNewOne_WeaponType(CVector coors, eWeaponType weaponType, unsigned char pickupType,
    unsigned int ammo, bool isEmpty, char* message);

删除拾取物

RemovePickUp / RemovePickUpsInArea
static void RemovePickUp(int pickupHandle);
static void RemovePickUpsInArea(float cornerA_x, float cornerA_y, float cornerA_z,
    float cornerB_x, float cornerB_y, float cornerB_z);
static void RemoveMissionPickUps();
static void RemoveUnnecessaryPickups(CVector const& posn, float radius);

是否被捡起

IsPickUpPickedUp / GetActualPickupIndex
static bool IsPickUpPickedUp(int pickupHandle);
static int GetActualPickupIndex(int pickupIndex);
static int GetUniquePickupIndex(int pickupIndex);

区域检测

TestForPickupsInBubble
static bool TestForPickupsInBubble(CVector posn, float radius);

武器模型对照

ModelForWeapon
static int ModelForWeapon(eWeaponType weaponType);
// WeaponForModel 等同文件

撒钱

CreateSomeMoney
static void CreateSomeMoney(CVector coors, int amount);

全局数组

aPickUps / MAX_NUM_PICKUPS

直接扫表要小心生命周期。

static CPickup* aPickUps;
// MAX_NUM_PICKUPS(620)

On this page