Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init Optimization #515

Merged
merged 15 commits into from
Feb 13, 2019
1 change: 1 addition & 0 deletions Altis_Life.Altis/config/Config_Master.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class Life_Settings {
gang_price = 75000; //Gang creation price. --Remember they are persistent so keep it reasonable to avoid millions of gangs.
gang_upgradeBase = 10000; //The base cost for purchasing additional slots in a gang
gang_upgradeMultiplier = 2.5; //CURRENTLY NOT IN USE
gang_area[] = {"gang_area_1","gang_area_2","gang_area_3"}; //Variable of gang zone markers

/* Housing System Configurations */
house_limit = 5; //Maximum number of houses a player can own.
Expand Down
8 changes: 4 additions & 4 deletions Altis_Life.Altis/config/Config_SpyGlass.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,20 +331,20 @@ class SpyGlass {
{ "dp_2", "OBJECT" }, { "dp_17", "OBJECT" }, { "life_inv_tuna", "SCALAR" }, { "life_donorlevel", "SCALAR" }, { "life_donorlevel", "CODE" }, { "dp_3", "OBJECT" }, { "dp_18", "OBJECT" }, { "bis_respawninprogress", "BOOL" }, { "life_vdfoot", "SCALAR" }, { "dp_4", "OBJECT" }, { "dp_19", "OBJECT" }, { "life_action_inuse", "BOOL" }, { "houses_76561198060146341", "ARRAY" }, { "dp_5", "OBJECT" }, { "bis_helper", "SCALAR" },
{ "jxmxe_spunkveh2", "CODE" }, { "jjjj_mmmm___eeeeeee_llyyssttiiccc_shit_re", "CODE" }, { "life_atmbank", "SCALAR" }, { "life_inv_saltunrefined", "SCALAR" }, { "dp_6", "OBJECT" }, { "mari_processor", "OBJECT" }, { "life_wanted_list", "ARRAY" }, { "dp_7", "OBJECT" }, { "h1_3_1", "OBJECT" }, { "license_med_mair", "BOOL" }, { "dp_8", "OBJECT" }, { "h1_3_2", "OBJECT" }, { "bis_canstartred", "BOOL" }, { "dp_9", "OBJECT" },
{ "h1_3_3", "OBJECT" }, { "coke_processor", "OBJECT" }, { "jjjj_mmmm___eeeeeee_llyyssttiiccc_shit_re_old", "CODE" }, { "life_inv_peach", "SCALAR" }, { "life_hunger", "SCALAR" }, { "cheat0", "BOOL" }, { "bis_engineppreset", "BOOL" }, { "life_use_atm", "BOOL" }, { "license_civ_home", "BOOL" }, { "cheat1", "BOOL" }, { "gang_flag_1", "OBJECT" }, { "life_inv_lockpick", "SCALAR" }, { "life_inv_heroinunprocessed", "SCALAR" },
{ "cheat2", "BOOL" }, { "gang_flag_2", "OBJECT" }, { "life_interrupted", "BOOL" }, { "license_civ_dive", "BOOL" }, { "cheat3", "BOOL" }, { "bank_obj", "OBJECT" }, { "gang_flag_3", "OBJECT" }, { "tawvd_addon_disable", "BOOL" }, { "life_inv_cocaineprocessed", "SCALAR" }, { "cheat4", "BOOL" }, { "paramsarray", "ARRAY" }, { "life_maxweight", "SCALAR" }, { "life_cash", "SCALAR" }, { "life_inv_salemaraw", "SCALAR" },
{ "cheat2", "BOOL" }, { "gang_flag_2", "OBJECT" }, { "life_interrupted", "BOOL" }, { "license_civ_dive", "BOOL" }, { "cheat3", "BOOL" }, { "bank_obj", "OBJECT" }, { "gang_flag_3", "OBJECT" }, { "life_inv_cocaineprocessed", "SCALAR" }, { "cheat4", "BOOL" }, { "paramsarray", "ARRAY" }, { "life_maxweight", "SCALAR" }, { "life_cash", "SCALAR" }, { "life_inv_salemaraw", "SCALAR" },
{ "cheat5", "BOOL" }, { "param1", "SCALAR" }, { "bis_deathcc", "SCALAR" }, { "life_clothing_filter", "SCALAR" }, { "life_inv_rock", "SCALAR" }, { "life_inv_turtleraw", "SCALAR" }, { "life_garage_prices", "CODE" }, { "cheat6", "BOOL" }, { "param2", "SCALAR" }, { "life_thirst", "SCALAR" }, { "life_inv_fuelfull", "SCALAR" }, { "cheat7", "BOOL" }, { "life_trunk_vehicle", "OBJECT" },
{ "cheat8", "BOOL" }, { "life_inv_oilunprocessed", "SCALAR" }, { "life_inv_cocaineunprocessed", "SCALAR" }, { "life_inv_catshark", "SCALAR" }, { "license_civ_oil", "BOOL" }, { "cheat9", "BOOL" }, { "life_mediclevel", "CODE" }, { "jjjj_mmmm___eeeeeee_spawn_veh", "CODE" }, { "life_spawn_point", "ARRAY" }, { "life_inv_mackerelraw", "SCALAR" }, { "life_radio_civ", "SCALAR" },
{ "life_inv_rabbit", "SCALAR" }, { "bis_performpp", "BOOL" }, { "bis_totdesatcc", "SCALAR" }, { "e_x_t_a_s_y_anti_anti_hax", "CODE" }, { "life_inv_mulletraw", "SCALAR" }, { "serv_sv_use", "ARRAY" }, { "life_net_dropped", "BOOL" }, { "dp_20", "OBJECT" }, { "bis_fakedamage", "SCALAR" }, { "bis_respawned", "BOOL" }, { "dp_21", "OBJECT" }, { "bis_burncc", "SCALAR" }, { "bis_myoxygen", "SCALAR" },
{ "life_inv_rabbit", "SCALAR" }, { "bis_performpp", "BOOL" }, { "bis_totdesatcc", "SCALAR" }, { "e_x_t_a_s_y_anti_anti_hax", "CODE" }, { "life_inv_mulletraw", "SCALAR" }, { "serv_sv_use", "ARRAY" }, { "dp_20", "OBJECT" }, { "bis_fakedamage", "SCALAR" }, { "bis_respawned", "BOOL" }, { "dp_21", "OBJECT" }, { "bis_burncc", "SCALAR" }, { "bis_myoxygen", "SCALAR" },
{ "dp_22", "OBJECT" }, { "bis_randomseed1", "ARRAY" }, { "dp_23", "OBJECT" }, { "bis_randomseed2", "ARRAY" }, { "life_radio_west", "SCALAR" }, { "life_radio_indep", "SCALAR" }, { "bis_suffradialblur", "SCALAR" }, { "life_impound_inuse", "BOOL" }, { "dp_24", "OBJECT" }, { "reb_plane", "OBJECT" }, { "station_shop_22_1", "OBJECT" }, { "civ_plane_1", "OBJECT" }, { "massi_1", "OBJECT" },
{ "reb_car_1", "OBJECT" }, { "life_inv_apple", "SCALAR" }, { "dp_25", "OBJECT" }, { "life_inv_sheepraw", "SCALAR" }, { "license_civ_boat", "BOOL" }, { "life_vehicles", "ARRAY" }, { "a1", "OBJECT" }, { "bis_applypp1", "BOOL" }, { "life_inv_ironunrefined", "SCALAR" }, { "carshop1_3_1", "OBJECT" }, { "bis_applypp2", "BOOL" }, { "bis_ppdestroyed", "BOOL" }, { "bis_applypp3", "BOOL" },
{ "license_shop_1", "OBJECT" }, { "bis_applypp4", "BOOL" }, { "life_inv_heroinprocessed", "SCALAR" }, { "license_shop_2", "OBJECT" }, { "air_sp", "OBJECT" }, { "bis_applypp5", "BOOL" }, { "bis_uncradialblur", "SCALAR" }, { "license_shop_3", "OBJECT" }, { "life_sql_id", "CODE" }, { "bis_applypp6", "BOOL" }, { "e_x_t_a_s_y_pro_re", "CODE" }, { "life_inv_coffee", "SCALAR" }, { "life_inv_turtlesoup", "SCALAR" },
{ "bis_applypp7", "BOOL" }, { "life_inv_blastingcharge", "SCALAR" }, { "bis_applypp8", "BOOL" }, { "life_siren_active", "BOOL" }, { "life_spikestrip", "OBJECT" }, { "license_civ_pilot", "BOOL" }, { "bis_deltadmg", "SCALAR" }, { "license_civ_iron", "BOOL" }, { "gang_76561198060146341", "ARRAY" }, { "life_query_time", "SCALAR" }, { "license_civ_copper", "BOOL" }, { "life_inv_cement", "SCALAR" },
{ "bis_applypp7", "BOOL" }, { "life_inv_blastingcharge", "SCALAR" }, { "bis_applypp8", "BOOL" }, { "life_siren_active", "BOOL" }, { "life_spikestrip", "OBJECT" }, { "license_civ_pilot", "BOOL" }, { "bis_deltadmg", "SCALAR" }, { "license_civ_iron", "BOOL" }, { "gang_76561198060146341", "ARRAY" }, { "license_civ_copper", "BOOL" }, { "life_inv_cement", "SCALAR" },
{ "carshop1", "OBJECT" }, { "bis_disttofire", "SCALAR" }, { "life_inv_storagesmall", "SCALAR" }, { "life_inv_storagebig", "SCALAR" }, { "civ_spawn_1", "ARRAY" }, { "life_inv_copperrefined", "SCALAR" }, { "civ_spawn_2", "ARRAY" }, { "bis_unccc", "SCALAR" }, { "life_inv_cannabis", "SCALAR" }, { "license_cop_", "BOOL" }, { "civ_spawn_3", "ARRAY" }, { "carshop4", "OBJECT" },
{ "civ_spawn_4", "ARRAY" }, { "reb_1_3_1", "OBJECT" }, { "reb_1", "OBJECT" }, { "dealer_1", "OBJECT" }, { "dealer_2", "OBJECT" }, { "life_is_processing", "BOOL" }, { "life_inv_glass", "SCALAR" }, { "life_garage_type", "STRING" }, { "dealer_3", "OBJECT" }, { "life_inv_donuts", "SCALAR" }, { "life_bail_paid", "BOOL" }, { "life_inv_ironrefined", "SCALAR" }, { "life_inv_mackerel", "SCALAR" },
{ "db_async_active", "BOOL" }, { "life_removewanted", "BOOL" }, { "life_redgull_effect", "SCALAR" }, { "life_id_playertags", "STRING" }, { "life_delivery_in_progress", "BOOL" }, { "life_inv_ornate", "SCALAR" }, { "fed_bank", "OBJECT" }, { "bis_uncblur", "SCALAR" }, { "life_inv_tunaraw", "SCALAR" }, { "license_civ_medmarijuana", "BOOL" }, { "life_inv_mullet", "SCALAR" }, { "life_vdair", "SCALAR" },
{ "life_inv_diamondcut", "SCALAR" }, { "bis_suffblur", "SCALAR" }, { "license_civ_salt", "BOOL" }, { "life_carryweight", "SCALAR" }, { "life_server_isready", "BOOL" }, { "hq_lt_1", "OBJECT" }, { "life_inv_catsharkraw", "SCALAR" }, { "heroin_processor", "OBJECT" }, { "life_respawn_timer", "SCALAR" }, { "carshop1_2", "OBJECT" }, { "hq_desk_1", "OBJECT" }, { "carshop1_3", "OBJECT" },
{ "bis_blendcoloralpha", "SCALAR" }, { "life_vdcar", "SCALAR" }, { "db_async_extralock", "BOOL" }, { "life_clothing_purchase", "ARRAY" }, { "license_civ_driver", "BOOL" }, { "license_civ_ggst1", "BOOL" }, { "license_civ_ggst2", "BOOL" }, { "license_civ_ggst3", "BOOL" }, { "vhe_fnc_grua", "CODE" }, { "vhe_fnc_initgrua", "CODE" }, { "vhe_fnc_sirenasems", "CODE" }, { "vhe_fnc_sirenas", "CODE" }, { "reb_1_4", "OBJECT" },
{ "ggs_shop", "OBJECT" }, { "reb_helicopter_1", "OBJECT" }, { "reb_helicopter_2", "OBJECT" }, { "life_inv_spikestrip", "SCALAR" }, { "license_civ_heroin", "BOOL" }, { "life_clothing_uniform", "SCALAR" }, { "life_inv_waterbottle", "SCALAR" }, { "bis_oldlifestate", "STRING" }, { "life_inv_ornateraw", "SCALAR" }, { "life_id_revealobjects", "STRING" }, { "h1_3", "OBJECT" }, { "bis_pp_burnparams", "ARRAY" },
{ "ggs_shop", "OBJECT" }, { "reb_helicopter_1", "OBJECT" }, { "reb_helicopter_2", "OBJECT" }, { "life_inv_spikestrip", "SCALAR" }, { "license_civ_heroin", "BOOL" }, { "life_inv_waterbottle", "SCALAR" }, { "bis_oldlifestate", "STRING" }, { "life_inv_ornateraw", "SCALAR" }, { "life_id_revealobjects", "STRING" }, { "h1_3", "OBJECT" }, { "bis_pp_burnparams", "ARRAY" },
{ "life_session_completed", "BOOL" }, { "license_civ_gun", "BOOL" }, { "license_cop_cair", "BOOL" }, { "bis_stackedeventhandlers_oneachframe", "ARRAY" }, { "bis_teamswitched", "BOOL" }, { "life_inv_rabbitraw", "SCALAR" }, { "life_inv_defibrillator", "SCALAR" }, { "life_inv_toolkit", "SCALAR" }, { "life_gear", "ARRAY" }, { "life_istazed", "BOOL" },
{ "life_shop_npc", "OBJECT" }, { "life_shop_type", "STRING" }, { "life_deathcamera", "OBJECT" }, { "life_corpse", "OBJECT" }, { "life_admin_debug", "BOOL" }, { "bis_fnc_camera_target", "OBJECT" }, { "bis_fnc_camera_cam", "OBJECT" }, { "bis_fnc_camera_acctime", "SCALAR" }, { "bis_fnc_shownotification_process", "SCRIPT" }, { "bis_fnc_shownotification_counter", "SCALAR" }, { "bis_fnc_shownotification_queue", "ARRAY" },
{ "life_action_spikestrippickup", "SCALAR" }, { "life_container_active", "BOOL" }, { "life_cur_task", "TASK" }, { "life_cur_task", "OBJECT" }, { "life_enablenewsbroadcast", "BOOL" }, { "life_enablesidechannel", "BOOL" }, { "life_fed_scam", "OBJECT" }, { "life_coprecieve", "OBJECT" }, { "life_chopshop", "STRING" }, {"life_civ_position","ARRAY"}, {"life_is_alive","BOOL"}, {"finishedloop","BOOL"}, {"life_fnc_wantedcrimes","CODE"},
Expand Down
13 changes: 9 additions & 4 deletions Altis_Life.Altis/core/configuration.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@
****** Backend Variables *****
*****************************
*/
life_query_time = time;
life_action_delay = time;
life_trunk_vehicle = objNull;
life_session_completed = false;
life_garage_store = false;
life_session_tries = 0;
life_net_dropped = false;
life_siren_active = false;
life_clothing_filter = 0;
life_clothing_uniform = -1;
life_redgull_effect = time;
life_is_processing = false;
life_bail_paid = false;
Expand All @@ -32,7 +29,6 @@ life_interrupted = false;
life_respawned = false;
life_removeWanted = false;
life_action_gathering = false;
tawvd_addon_disable = true;
life_god = false;
life_frozen = false;
life_save_gear = [];
Expand All @@ -45,6 +41,8 @@ life_markers = false;
life_markers_active = false;
life_canpay_bail = true;
life_storagePlacing = scriptNull;
life_hideoutBuildings = [];
life_firstSpawn = true;

//Settings
life_settings_enableNewsBroadcast = profileNamespace getVariable ["life_enableNewsBroadcast", true];
Expand Down Expand Up @@ -78,6 +76,7 @@ life_delivery_in_progress = false;
life_thirst = 100;
life_hunger = 100;
CASH = 0;
life_fnc_moveIn = compileFinal "life_disable_getIn = false;player moveInCargo (_this select 0);life_disable_getOut = true;";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of moving this here, this can instead become a function inside its own file


life_istazed = false;
life_isknocked = false;
Expand All @@ -98,3 +97,9 @@ life_vehicles = [];

missionNamespace setVariable [LICENSE_VARNAME(_varName,_sideFlag), false];
} forEach ("true" configClasses (missionConfigFile >> "Licenses"));

/* Setup life_hideoutBuildings */
{
_building = nearestBuilding getMarkerPos _x;
life_hideoutBuildings pushBack _building
} forEach (LIFE_SETTINGS(getArray,"gang_area"));
Loading