Skip to content

Commit

Permalink
[mil_opcom] Fix starting forces persistence
Browse files Browse the repository at this point in the history
  • Loading branch information
marceldev89 authored and DarrellJMartin committed Feb 6, 2018
1 parent c748dd2 commit 42b894e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/mil_opcom/fnc_OPCOM.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ switch(_operation) do {
if (!isNil "ALIVE_sys_data" && {!ALIVE_sys_data_DISABLED}) then {
// Load starting forces
private _missionName = [missionName, "%20", "-"] call CBA_fnc_replace;
private _key = format ["%1_%2-starting-forces", ALIVE_sys_data_GROUP_ID, _missionName];
private _key = format ["%1_%2-OPCOM_%3-starting-forces", ALIVE_sys_data_GROUP_ID, _missionName, [_handler, "opcomID"] call CBA_fnc_hashGet];
private _result = [GVAR(DATAHANDLER), "read", ["mil_opcom", [], _key]] call ALIVE_fnc_Data;

if (_result isEqualType []) then {
Expand Down Expand Up @@ -1693,7 +1693,7 @@ switch(_operation) do {

// Save starting forces (every session to allow users to modify the array and persist it)
if (!isnil {[_logic,"startForceStrength"] call ALiVE_fnc_HashGet}) then {
private _key = format ["%1-starting-forces", _missionName];
private _key = format ["%1-OPCOM_%2-starting-forces", _missionName, [_logic, "opcomID"] call CBA_fnc_hashGet];
private _prev = [GVAR(DATAHANDLER), "read", ["mil_opcom", [], _key]] call ALIVE_fnc_Data;

private _startForceStrength = [_logic,"startForceStrength"] call ALiVE_fnc_HashGet;
Expand Down

0 comments on commit 42b894e

Please sign in to comment.