CSW - Fix mag multiplication in multiplayer (#9232)

This commit is contained in:
Grim 2023-08-12 22:31:30 +03:00 committed by GitHub
parent fdbcc62c74
commit 7c70ded9bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,10 @@ GVAR(vehicleMagCache) = createHashMap;
["CBA_settingsInitialized", {
TRACE_3("settingsInit",GVAR(defaultAssemblyMode),GVAR(handleExtraMagazines),GVAR(ammoHandling));
["StaticWeapon", "init", LINKFUNC(staticWeaponInit), true, [], true] call CBA_fnc_addClassEventHandler;
["StaticWeapon", "Init", {
// needs a small delay for network syncing, or we end up with duplicate mags with ammo handling
[LINKFUNC(staticWeaponInit), _this, 1] call CBA_fnc_waitAndExecute;
}, true, [], true] call CBA_fnc_addClassEventHandler;
}] call CBA_fnc_addEventHandler;