Task #25337

Suggestion for ACRE Radios in NOMAD

Added by fREAk over 3 years ago. Updated about 3 years ago.

Status:Closed Start date:10/10/2011
Priority:High Due date:
Assignee:fREAk % Done:

100%

Category:Config
Target version:MSO v4.1
Component:ACRE Support Reproduced by another DH user:No
Close Reason: I am using some Mods:No
Affected Version:

Description

I recognized, that the ACRE-Radios getting saved into the RespwanWeaponary "as they are".
I gathered some experiances with ACRE in the times when i ACEified/ACREified WarfareBE
and would suggest to break them down to the BaseModel before storing it into the Array
to avoid duplicate RADIO_IDs. ( _radio = ["SOME_ACRE_RADIO_XX"] call acre_api_fnc_getBaseRadio; )

If for example, me is disconnecting with PRC_119_ID_2, the Radio gets deletet by ACRE,
and the ID is free. After me someone takes a 119, he gets the next free ID, wich is ID_2,
If i reconnect now, we got 2 PRC_119_ID_2 Radios wich will conflict.

Maybe Nou can confirm that, since i didn't investigate how the current release handles that.
It was just a thing i saw when i investigatet NOMAD and had the feeling it should be said :).
P.S.
Be aware i dont know if this on is solved, but the "acre_api_fnc_getBaseRadio" API Command,
returned a wrong Radio when used on PRC148 (cant link the Ticket since the ACRE Team changed
to their own Tracker

main.sqf - rmm_nomad main.sqf with ACRE fix (5.9 kB) Tupolov, 01/11/2012 17:22

History

Updated by Tupolov about 3 years ago

  • Category set to Config
  • Assignee set to Tupolov
  • Priority changed from Low to Normal
  • Target version set to MSO v4.6
  • Component set to ACRE Support

Will ask Nou.

Updated by Tupolov about 3 years ago

  • Priority changed from Normal to High

Updated by Tupolov about 3 years ago

  • Status changed from New to Resolved
  • Target version changed from MSO v4.6 to MSO v4.1
  • % Done changed from 0 to 100

Have added the following in NOMAD to account for ACRE radios. This is executed when the user reconnects. Essentially it removes all weapons and items, it then adds each weapon/item recorded on disconnect to the player. For each item it checks to see if ACRE is being used and if so, if the weapon/item is a derivative of an ACRE Base Radio. If so it just adds the base radio and not the radio with the ID.

{player removeweapon _x;} foreach ((weapons player) + (items player)); {
if (isClass(configFile>>"CfgPatches">>"acre_main")) then {
// Catch any acre radios and store as base radio (do not store radio with ID) http://tracker.idi-systems.com/issues/2
private ["_ret"];
_ret = [_x] call acre_api_fnc_getBaseRadio;
if (typeName _ret == "STRING") then {
player addweapon _ret;
} else {
player addweapon _x;
};
} else {
player addweapon _x;
};
} foreach _this;

Updated by Tupolov about 3 years ago

  • File main.sqf added
  • Status changed from Resolved to Feedback
  • Assignee changed from Tupolov to fREAk

fREAk,

Can you test the attached code?

Thanks

Tup

Updated by Tupolov about 3 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF