You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rewrite CBA_fnc_addMagazine, CBA_fnc_removeWeapon and CBA_fnc_removeMagazineto work on remote units. (still won't work with CBA_fnc_addWeapon unfortunately)
remove broken function CBA_fnc_addMagazineVerified. (doesn't and never did work with A3 inventory system)
as replacement, add optional parameter to CBA_fnc_addWeapon and CBA_fnc_addMagazine; put item in nearby ground weapon holder if the inventory is full
add another optional parameter to CBA_fnc_addMagazine. Can add a magazine with a specific ammo count
add optional parameter to CBA_fnc_removeMagazine. Can now remove a magazine with a specified ammo count.
add CBA_fnc_addItem and CBA_fnc_removeItem to complement other functions (can't use addWeapon on first aid kits)
deprecate CBA_fnc_addXCargoGlobal and CBA_fnc_addXCargoGlobal functions. The local inventory space is no longer supported in A3. Instead, the local variants of the commands only work when the target object is local, but the command has global effect.
add optional parameter to CBA_fnc_addWeaponCargo and CBA_fnc_addMagazineCargo; put items in nearby ground weapon holder if cargo is full
add CBA_fnc_addItemCargo and CBA_fnc_addBackpackCargo
add CBA_fnc_getItemConfig. returns config path of any item class name given. (works with CfgWeapons, CfgMagaines and CfgGlasses)
add CBA_fnc_getObjectConfig. returns config path of any object or object class name. (works with any OBJECT type in the game, CfgVehicles, CfgAmmo, CfgNonAIVehicles)
remove broken function CBA_fnc_determineMuzzles, (wouldn't report muzzles correctly, probably due to incompatibility with A3)
add replacement CBA_fnc_getMuzzles instead. returns all muzzle names of a weapon.
add CBA_fnc_getWeaponModes. returns weapon modes of a weapon. optional parameter to include AI only modes.
improve CBA_fnc_getTurret with new SQF commands. should be faster now. also supports invalid turret paths now and returns <config null> for them. also supports [-1] turret designation for driver turrets, which is occasionally used in A3 (old function would error)
add CBA_fnc_vehicleRole. returns the role of a soldier inside his current vehicle. (driver, gunner, commander, turret, cargo; empty string when on foot). the assignedVehicleRole SQF command is meant for AI and fails on clients on remote units in MP
add CBA_fnc_turretPath. returns the current turret path of a soldier when inside a vehicle (reverse version of turretUnit SQF command
add CBA_fnc_turretPathWeapon. returns the turret path of a weapon of a vehicle (reverse version of weaponsTurret SQF command.
rewrite CBA_fnc_getFirer. Slightly faster. Now handles modified weapons instead of reling on config defaults. Now correctly handles soldiers and helicopters (would always return the same turret on them). also handles manual fire (will report the pilot instead of objNull, while keeping the weapons turret path).
sort functions in different categories, so they are easier to handle in the ingame functions viewer
params and headers for other functions. small improvements with new commands and formatting
remove team color synch handling internal functions from functions viewer by using PREP
remove unreachable or no longer working, commented out code and delete no longer valid comments
deprecate: CBA_common_fnc_directCall with way faster CBA_fnc_directCall CBA_fnc_intToString with (now) way faster str CBA_fnc_defaultParam which is now just a copy of a simple param command CBA_fnc_systemChat with systemChat (added at the end of A2 OA) CBA_fnc_getPistol with handgunWeapon from A3 CBA_fnc_createCenter as createCenter is no longer needed in A3 CBA_fnc_players with allPlayers (v1.44 A3) CBA_fnc_locked as it was for compatibility between TOH and A2, which are no longer supported
remove functions that were deprecated (with RPT log) 6+ years ago
The reason will be displayed to describe this comment to others. Learn more.
It's not a million magazines, but one magazine with full ammo.
See: https://community.bistudio.com/wiki/addMagazine_array addMagazine STRING fails on remote units. The alternate syntax addMagazine ARRAY does work on remote units.
I've tested this in local hosted MP and it's true. addMagazine does desynch the inventory causing weird issues when used on remote units. This is part of the fix to get this function working on all units regardless of locality.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
same as the other one, but friendlier to review (I hope)