实体
流式 CStreaming
请求加载模型与场景
CStreaming.h
也可走 Command REQUEST_MODEL(见 Command)。
请求与加载模型
RequestModel / LoadAllRequestedModels / HasModelLoaded
static void RequestModel(int dwModelId, int Streamingflags);
static void LoadAllRequestedModels(bool bOnlyPriorityRequests);
static bool HasModelLoaded(int modelIndex);
static void SetModelIsDeletable(int modelIndex);
static void SetModelTxdIsDeletable(int modelIndex);移除模型
RemoveModel
用完再删,避免正在用的被踢。
static void RemoveModel(int Modelindex);特殊模型 / 特殊角色
RequestSpecialModel / RequestSpecialChar
static void RequestSpecialModel(int slot, char const* name, int StreamingFlags);
static void RequestSpecialChar(int slot, char const* Name, int streamingFlags);
static bool HasSpecialCharLoaded(int slot);
static void RequestPlayerSection(int modelIndex, char const* string, int streamingFlags);TXD 与升级件
RequestTxdModel / RequestVehicleUpgrade
static void RequestTxdModel(int TxdModelID, int Streamingflags);
static void RequestVehicleUpgrade(int modelIndex, int StreamingFlags);
static bool HasVehicleUpgradeLoaded(int ModelIndex);加载场景碰撞
LoadScene / LoadSceneCollision / RequestBigBuildings
static void LoadScene(CVector const* Posn);
static void LoadSceneCollision(CVector const* Posn);
static void RequestBigBuildings(CVector const* posn);内存与状态
ms_memoryAvailable / ms_numPriorityRequests
诊断用。
static unsigned int& ms_memoryAvailable;
static unsigned int& ms_numPriorityRequests;典型顺序
RequestModel
→ LoadAllRequestedModels(或分帧等 HasModelLoaded)
→ 创建实体 / SetModelIndex
→ SetModelIsDeletable(可选)