[saco] Implement/match CGame::CreateWeaponPickup(...)

This commit is contained in:
RD42 2024-08-14 23:06:11 +08:00
parent a03988d085
commit e83613689a
3 changed files with 20 additions and 0 deletions

View File

@ -833,6 +833,22 @@ const PCHAR CGame::GetWeaponName(int iWeaponID)
//-----------------------------------------------------------
DWORD CGame::CreateWeaponPickup(int iModel, DWORD dwAmmo, float fX, float fY, float fZ)
{
DWORD hnd;
if(!IsModelLoaded(iModel)) {
RequestModel(iModel);
LoadRequestedModels();
while(!IsModelLoaded(iModel)) Sleep(5);
}
ScriptCommand(&create_pickup_with_ammo, iModel, 4, dwAmmo, fX, fY, fZ, &hnd);
return hnd;
}
//-----------------------------------------------------------
DWORD CGame::GetD3DDevice()
{
DWORD pdwD3DDev=0;

View File

@ -101,6 +101,8 @@ public:
const PCHAR GetWeaponName(int iWeaponID);
DWORD CreateWeaponPickup(int iModel, DWORD dwAmmo, float fX, float fY, float fZ);
int GetScreenWidth() { return *(int*)0xC17044; };
int GetScreenHeight() { return *(int*)0xC17048; };

View File

@ -82,6 +82,8 @@ const SCRIPT_COMMAND set_actor_money = { 0x03fe, "ii" };
const SCRIPT_COMMAND text_clear_all = { 0x00be, "" };
const SCRIPT_COMMAND create_pickup_with_ammo = { 0x032b, "iiifffv" };
const SCRIPT_COMMAND create_radar_marker_icon = { 0x0570, "fffiv" };
const SCRIPT_COMMAND remove_panel = { 0x08DA, "i" };