[saco] Correct CGame::CreateWeaponPickup to inline the model wait; calling IsModelLoaded and friends out of line was wrong, the only delta left is MSVC rotating the wait loop where retail leaves it top tested

This commit is contained in:
ricardoofnl
2026-09-05 09:18:19 +07:00
parent 2f9da6d14b
commit f4d31db33e
+7 -4
View File
@@ -1093,10 +1093,13 @@ DWORD CGame::CreateWeaponPickup(int iModel, DWORD dwAmmo, float fX, float fY, fl
{
DWORD hnd;
if(!IsModelLoaded(iModel)) {
RequestModel(iModel);
LoadRequestedModels();
while(!IsModelLoaded(iModel)) Sleep(5);
// the model wait is spelled out, none of the model helpers are inline here
if(iModel <= 20000 && iModel >= 0 && !ScriptCommand(&is_model_available, iModel))
{
ScriptCommand(&request_model, iModel);
ScriptCommand(&load_requested_models);
while(!ScriptCommand(&is_model_available, iModel)) Sleep(5);
}
ScriptCommand(&create_pickup_with_ammo, iModel, 4, dwAmmo, fX, fY, fZ, &hnd);