diff --git a/Altis_Life.Altis/Functions.hpp b/Altis_Life.Altis/Functions.hpp index 97aa193fd..a0a32f1d3 100644 --- a/Altis_Life.Altis/Functions.hpp +++ b/Altis_Life.Altis/Functions.hpp @@ -180,7 +180,6 @@ class Life_Client_Core { class dropItems {}; class escInterupt {}; class fetchCfgDetails {}; - class fetchDeadGear {}; class fetchVehInfo {}; class isDamaged {}; class giveDiff {}; @@ -194,7 +193,6 @@ class Life_Client_Core { class inventoryOpened {}; class isUIDActive {}; class keyHandler {}; - class loadDeadGear {}; class loadGear {}; class nearATM {}; class nearestDoor {}; diff --git a/Altis_Life.Altis/config/Config_SpyGlass.hpp b/Altis_Life.Altis/config/Config_SpyGlass.hpp index da5676e2f..2a1a78c0d 100644 --- a/Altis_Life.Altis/config/Config_SpyGlass.hpp +++ b/Altis_Life.Altis/config/Config_SpyGlass.hpp @@ -249,7 +249,7 @@ class SpyGlass { "life_fnc_copbreakdoor_meta","life_fnc_cophouseowner","life_fnc_cophouseowner_meta","life_fnc_copinteractionmenu","life_fnc_copinteractionmenu_meta","life_fnc_coplights","life_fnc_coplights_meta","life_fnc_copmarkers","life_fnc_copmarkers_meta","life_fnc_copsearch","life_fnc_copsearch_meta","life_fnc_copsiren", "life_fnc_copsiren_meta","life_fnc_copsplit","life_fnc_copsplit_meta","life_fnc_corpse","life_fnc_corpse_meta","life_fnc_creategang","life_fnc_creategang_meta","life_fnc_deathscreen","life_fnc_deathscreen_meta","life_fnc_defusekit","life_fnc_defusekit_meta","life_fnc_demochargetimer","life_fnc_demochargetimer_meta","life_fnc_devicemine","life_fnc_devicemine_meta", "life_fnc_displayhandler","life_fnc_displayhandler_meta","life_fnc_dooranimate","life_fnc_dooranimate_meta","life_fnc_dpfinish","life_fnc_dpfinish_meta","life_fnc_dropfishingnet","life_fnc_dropfishingnet_meta","life_fnc_dropitems","life_fnc_dropitems_meta","life_fnc_escinterupt","life_fnc_escinterupt_meta","life_fnc_escortaction","life_fnc_escortaction_meta", - "life_fnc_fedcamdisplay","life_fnc_fedcamdisplay_meta","life_fnc_fetchcfgdetails","life_fnc_fetchcfgdetails_meta","life_fnc_fetchdeadgear","life_fnc_fetchdeadgear_meta","life_fnc_fetchvehinfo","life_fnc_fetchvehinfo_meta","life_fnc_flashbang","life_fnc_flashbang_meta","life_fnc_freezeplayer","life_fnc_freezeplayer_meta","life_fnc_fuellbchange","life_fnc_fuellbchange_meta", + "life_fnc_fedcamdisplay","life_fnc_fedcamdisplay_meta","life_fnc_fetchcfgdetails","life_fnc_fetchcfgdetails_meta","life_fnc_fetchvehinfo","life_fnc_fetchvehinfo_meta","life_fnc_flashbang","life_fnc_flashbang_meta","life_fnc_freezeplayer","life_fnc_freezeplayer_meta","life_fnc_fuellbchange","life_fnc_fuellbchange_meta", "life_fnc_fuelrefuelcar","life_fnc_fuelrefuelcar_meta","life_fnc_fuelstatopen","life_fnc_fuelstatopen_meta","life_fnc_fuelstore","life_fnc_fuelstore_meta","life_fnc_fuelsupply","life_fnc_fuelsupply_meta","life_fnc_gangcreated","life_fnc_gangcreated_meta","life_fnc_usegangbank","life_fnc_usegangbank_meta","life_fnc_gangdisband","life_fnc_gangdisband_meta","life_fnc_gangdisbanded", "life_fnc_gangdisbanded_meta","life_fnc_ganginvite","life_fnc_ganginvite_meta","life_fnc_ganginviteplayer","life_fnc_ganginviteplayer_meta","life_fnc_gangkick","life_fnc_gangkick_meta","life_fnc_gangleave","life_fnc_gangleave_meta","life_fnc_gangmenu","life_fnc_gangmenu_meta","life_fnc_gangnewleader","life_fnc_gangnewleader_meta","life_fnc_gangupgrade","life_fnc_gangupgrade_meta", "life_fnc_gangbankresponse","life_fnc_gangbankresponse_meta","life_fnc_garagelbchange","life_fnc_garagelbchange_meta","life_fnc_garagerefund","life_fnc_garagerefund_meta","life_fnc_gather","life_fnc_gather_meta","life_fnc_getbuildingpositions","life_fnc_getbuildingpositions_meta","life_fnc_getdpmission","life_fnc_getdpmission_meta","life_fnc_givediff","life_fnc_givediff_meta","life_fnc_giveitem", @@ -258,7 +258,7 @@ class SpyGlass { "life_fnc_initgang_meta","life_fnc_inithouses","life_fnc_inithouses_meta","life_fnc_initmedic","life_fnc_initmedic_meta","life_fnc_inventoryclosed","life_fnc_inventoryclosed_meta","life_fnc_inventoryopened","life_fnc_inventoryopened_meta","life_fnc_isdamaged","life_fnc_isdamaged_meta","life_fnc_isnumeric","life_fnc_isnumeric_meta","life_fnc_isuidactive","life_fnc_isuidactive_meta", "life_fnc_itemweight","life_fnc_itemweight_meta","life_fnc_jail","life_fnc_jail_meta","life_fnc_jailme","life_fnc_jailme_meta","life_fnc_jailsys","life_fnc_jailsys_meta","life_fnc_jerrycanrefuel","life_fnc_jerrycanrefuel_meta","life_fnc_jerryrefuel","life_fnc_jerryrefuel_meta","life_fnc_jumpfnc","life_fnc_jumpfnc_meta","life_fnc_keydrop","life_fnc_keydrop_meta","life_fnc_keygive", "life_fnc_keygive_meta","life_fnc_keyhandler","life_fnc_keyhandler_meta","life_fnc_keymenu","life_fnc_keymenu_meta","life_fnc_knockedout","life_fnc_knockedout_meta","life_fnc_knockoutaction","life_fnc_knockoutaction_meta","life_fnc_levelcheck","life_fnc_levelcheck_meta","life_fnc_licensecheck","life_fnc_licensecheck_meta","life_fnc_licensesread","life_fnc_licensesread_meta","life_fnc_lighthouse", - "life_fnc_lighthouse_meta","life_fnc_lighthouseaction","life_fnc_lighthouseaction_meta","life_fnc_loaddeadgear","life_fnc_loaddeadgear_meta","life_fnc_loadgear","life_fnc_loadgear_meta","life_fnc_lockhouse","life_fnc_lockhouse_meta","life_fnc_lockpick","life_fnc_lockpick_meta","life_fnc_lockuphouse","life_fnc_lockuphouse_meta","life_fnc_lockvehicle","life_fnc_lockvehicle_meta","life_fnc_mediclights", + "life_fnc_lighthouse_meta","life_fnc_lighthouseaction","life_fnc_lighthouseaction_meta","life_fnc_loadgear","life_fnc_loadgear_meta","life_fnc_lockhouse","life_fnc_lockhouse_meta","life_fnc_lockpick","life_fnc_lockpick_meta","life_fnc_lockuphouse","life_fnc_lockuphouse_meta","life_fnc_lockvehicle","life_fnc_lockvehicle_meta","life_fnc_mediclights", "life_fnc_mediclights_meta","life_fnc_medicmarkers","life_fnc_medicmarkers_meta","life_fnc_medicrequest","life_fnc_medicrequest_meta","life_fnc_medicsiren","life_fnc_medicsiren_meta","life_fnc_medicsirenlights","life_fnc_medicsirenlights_meta","life_fnc_mine","life_fnc_mine_meta","life_fnc_movein","life_fnc_movein_meta","life_fnc_nearatm","life_fnc_nearatm_meta", "life_fnc_nearestdoor","life_fnc_nearestdoor_meta","life_fnc_nearestobjects","life_fnc_nearestobjects_meta","life_fnc_nearunits","life_fnc_nearunits_meta","life_fnc_newsbroadcast","life_fnc_newsbroadcast_meta","life_fnc_numbertext","life_fnc_numbertext_meta","life_fnc_onfired","life_fnc_onfired_meta","life_fnc_onplayerkilled","life_fnc_onplayerkilled_meta","life_fnc_onplayerrespawn", "life_fnc_onplayerrespawn_meta","life_fnc_ontakeitem","life_fnc_ontakeitem_meta","life_fnc_openinventory","life_fnc_openinventory_meta","life_fnc_p_changescreen","life_fnc_p_changescreen_meta","life_fnc_p_getscreengroupidc","life_fnc_p_getscreengroupidc_meta","life_fnc_p_handlescreenevent","life_fnc_p_handlescreenevent_meta","life_fnc_p_init","life_fnc_p_init_meta","life_fnc_p_initmainmenu", diff --git a/Altis_Life.Altis/core/functions/fn_fetchDeadGear.sqf b/Altis_Life.Altis/core/functions/fn_fetchDeadGear.sqf deleted file mode 100644 index e8359b777..000000000 --- a/Altis_Life.Altis/core/functions/fn_fetchDeadGear.sqf +++ /dev/null @@ -1,70 +0,0 @@ -#include "..\..\script_macros.hpp" -/* - File: fn_fetchDeadGear.sqf - Author: Bryan "Tonic" Boardwine - - Description: - Fetches gear off of a body. -*/ - -params [["_unit",objNull,[objNull]]]; - -if (isNull _unit) exitWith {}; - -private _dropWeapons = LIFE_SETTINGS(getNumber,"drop_weapons_onDeath"); - -private _primary = [primaryWeapon _unit, ""] select _dropWeapons; -private _launcher = [secondaryWeapon _unit, ""] select _dropWeapons; -private _handgun = [handGunWeapon _unit, ""] select _dropWeapons; - -private _primitems = []; -private _secitems = []; -private _handgunitems = []; - -private _magazines = []; - -private _uniform = uniform _unit; -private _vest = vest _unit; -private _backpack = backpack _unit; - -private _items = assignedItems _unit; - -private _headgear = headgear _unit; -private _goggles = goggles _unit; -private _uitems = []; -private _vitems = []; -private _bitems = []; - -if !(primaryWeapon _unit isEqualTo "") then {_primitems = primaryWeaponItems _unit;}; -if !(handgunWeapon _unit isEqualTo "") then {_handgunItems = handgunItems _unit;}; - -if !(_uniform isEqualTo "") then {{_uitems pushBack _x; true} count (uniformItems _unit);}; -if !(_vest isEqualTo "") then {{_vitems pushBack _x; true} count (vestItems _unit);}; -if !(_backpack isEqualTo "") then {{_bitems pushBack _x; true} count (backPackItems _unit);}; - -if !(primaryWeapon _unit isEqualTo "") then { - _unit selectWeapon (primaryWeapon _unit); - if !(currentMagazine _unit isEqualTo "") then { - _magazines pushBack currentMagazine _unit; - }; -}; - -if !(secondaryWeapon _unit isEqualTo "") then { - _unit selectWeapon (secondaryWeapon _unit); - if !(currentMagazine _unit isEqualTo "") then { - _magazines pushBack currentMagazine _unit; - }; -}; - -if !(handgunWeapon _unit isEqualTo "") then { - _unit selectWeapon (handgunWeapon _unit); - if !(currentMagazine _unit isEqualTo "") then { - _magazines pushBack currentMagazine _unit; - }; -}; - -_unit selectWeapon (primaryWeapon _unit); - -if (isNil "_handgunItems") then {_handgunItems = ["","",""];}; - -[_primary,_launcher,_handgun,_magazines,_uniform,_vest,_backpack,_items,_primitems,_secitems,_handgunitems,_uitems,_vitems,_bitems,_headgear,_goggles]; diff --git a/Altis_Life.Altis/core/functions/fn_loadDeadGear.sqf b/Altis_Life.Altis/core/functions/fn_loadDeadGear.sqf deleted file mode 100644 index ad87cd8ce..000000000 --- a/Altis_Life.Altis/core/functions/fn_loadDeadGear.sqf +++ /dev/null @@ -1,64 +0,0 @@ -#include "..\..\script_macros.hpp" -/* - File: fn_loadDeadGear.sqf - Author: Bryan "Tonic" Boardwine - - Description: - BLAH -*/ -private ["_allowedItems","_loadout","_primary","_launcher","_handgun","_magazines","_uniform","_vest","_backpack","_items","_primitems","_secitems","_handgunitems","_uitems","_vitems","_bitems","_handle"]; -_loadout = [_this,0,[],[[]]] call BIS_fnc_param; - -_primary = _loadout select 0; -_launcher = _loadout select 1; -_handgun = _loadout select 2; -_magazines = _loadout select 3; -_uniform = _loadout select 4; -_vest = _loadout select 5; -_backpack = _loadout select 6; -_items = _loadout select 7; -_primitems = _loadout select 8; -_secitems = _loadout select 9; -_handgunitems = _loadout select 10; -_uitems = _loadout select 11; -_vitems = _loadout select 12; -_bitems = _loadout select 13; -_headgear = _loadout select 14; -_goggles = _loadout select 15; - -//Strip the unit down -RemoveAllWeapons player; -{player removeMagazine _x;} forEach (magazines player); -removeUniform player; -removeVest player; -removeBackpack player; -removeGoggles player; -removeHeadGear player; -{ - player unassignItem _x; - player removeItem _x; -} forEach (assignedItems player); - -//Add the gear -if (!(_uniform isEqualTo "")) then {_handle = [_uniform,true,false,false,false] spawn life_fnc_handleItem; waitUntil {scriptDone _handle};}; -if (!(_vest isEqualTo "")) then {_handle = [_vest,true,false,false,false] spawn life_fnc_handleItem; waitUntil {scriptDone _handle};}; -if (!(_backpack isEqualTo "")) then {_handle = [_backpack,true,false,false,false] spawn life_fnc_handleItem; waitUntil {scriptDone _handle};}; -{ - _handle = [_x,true,false,false,false] spawn life_fnc_handleItem; - waitUntil {scriptDone _handle}; -} forEach _magazines; - -if (!(_primary isEqualTo "")) then {[_primary,true,false,false,false] spawn life_fnc_handleItem;}; -if (!(_launcher isEqualTo "")) then {[_launcher,true,false,false,false] spawn life_fnc_handleItem;}; -if (!(_handgun isEqualTo "")) then {[_handgun,true,false,false,false] spawn life_fnc_handleItem;}; - -{_handle = [_x,true,false,false,false] spawn life_fnc_handleItem; waitUntil {scriptDone _handle};} forEach _items; -{[_x,true,false,false,true] call life_fnc_handleItem;} forEach (_uitems); -{[_x,true,false,false,true] call life_fnc_handleItem;} forEach (_vitems); -{[_x,true,true,false,false] call life_fnc_handleItem;} forEach (_bitems); -{[_x,true,false,true,false] call life_fnc_handleItem;} forEach (_primitems); -{[_x,true,false,true,false] call life_fnc_handleItem;} forEach (_secitems); -{[_x,true,false,true,false] call life_fnc_handleItem;} forEach (_handgunitems); - -if (!(_headgear isEqualTo "")) then {player addHeadGear _headgear}; -if (!(_goggles isEqualTo "")) then {player addGoggles _goggles}; diff --git a/Altis_Life.Altis/core/medical/fn_onPlayerKilled.sqf b/Altis_Life.Altis/core/medical/fn_onPlayerKilled.sqf index 49e8d0c45..1b596173c 100644 --- a/Altis_Life.Altis/core/medical/fn_onPlayerKilled.sqf +++ b/Altis_Life.Altis/core/medical/fn_onPlayerKilled.sqf @@ -113,7 +113,7 @@ if (!isNull _killer && {!(_killer isEqualTo _unit)} && {!(side _killer isEqualTo }; }; -life_save_gear = [player] call life_fnc_fetchDeadGear; +life_save_gear = getUnitLoadout player; if (LIFE_SETTINGS(getNumber,"drop_weapons_onDeath") isEqualTo 0) then { _unit removeWeapon (primaryWeapon _unit); diff --git a/Altis_Life.Altis/core/medical/fn_revived.sqf b/Altis_Life.Altis/core/medical/fn_revived.sqf index b6927b774..f21d4c593 100644 --- a/Altis_Life.Altis/core/medical/fn_revived.sqf +++ b/Altis_Life.Altis/core/medical/fn_revived.sqf @@ -10,7 +10,7 @@ private ["_medic","_dir","_reviveCost"]; _medic = param [0,"Unknown Medic",[""]]; _reviveCost = LIFE_SETTINGS(getNumber,"revive_fee"); -[life_save_gear] spawn life_fnc_loadDeadGear; +player setUnitLoadout life_save_gear; hint format [localize "STR_Medic_RevivePay",_medic,[_reviveCost] call life_fnc_numberText];