Skip to content

Commit

Permalink
Merge branch 'master' into versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
DomT602 authored Sep 21, 2018
2 parents d3281e1 + 5c3f60a commit 40d5479
Show file tree
Hide file tree
Showing 15 changed files with 149 additions and 221 deletions.
7 changes: 3 additions & 4 deletions Altis_Life.Altis/Functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ class Life_Client_Core {
class receiveMoney {};
class revealObjects {};
class saveGear {};
class searchPosEmpty {};
class simDisable {};
class stripDownPlayer {};
class teleport {};
Expand Down Expand Up @@ -325,6 +324,9 @@ class Life_Client_Core {

class Shops {
file = "core\shops";
class 3dPreviewDisplay {};
class 3dPreviewExit {};
class 3dPreviewInit {};
class atmMenu {};
class buyClothes {};
class changeClothes {};
Expand All @@ -336,10 +338,7 @@ class Life_Client_Core {
class fuelLBchange {};
class fuelStatOpen {};
class levelCheck {};
class vehicleShop3DPreview {};
class vehicleShopBuy {};
class vehicleShopEnd3DPreview {};
class vehicleShopInit3DPreview {};
class vehicleShopLBChange {};
class vehicleShopMenu {};
class virt_buy {};
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 @@ -260,14 +260,14 @@ class SpyGlass {
"life_fnc_receiveitem_meta","life_fnc_receivemoney","life_fnc_receivemoney_meta","life_fnc_removecontainer","life_fnc_removecontainer_meta","life_fnc_removeitem","life_fnc_removeitem_meta","life_fnc_removelicenses","life_fnc_removelicenses_meta","life_fnc_repairdoor","life_fnc_repairdoor_meta","life_fnc_repairtruck","life_fnc_repairtruck_meta","life_fnc_requestmedic","life_fnc_requestmedic_meta",
"life_fnc_respawned","life_fnc_respawned_meta","life_fnc_restrain","life_fnc_restrain_meta","life_fnc_restrainaction","life_fnc_restrainaction_meta","life_fnc_revealobjects","life_fnc_revealobjects_meta","life_fnc_revived","life_fnc_revived_meta","life_fnc_reviveplayer","life_fnc_reviveplayer_meta","life_fnc_robaction","life_fnc_robaction_meta","life_fnc_robperson","life_fnc_robperson_meta",
"life_fnc_robreceive","life_fnc_robreceive_meta","life_fnc_s_onchar","life_fnc_s_onchar_meta","life_fnc_s_oncheckedchange","life_fnc_s_oncheckedchange_meta","life_fnc_s_onsliderchange","life_fnc_s_onsliderchange_meta","life_fnc_safefix","life_fnc_safefix_meta","life_fnc_safeinventory","life_fnc_safeinventory_meta","life_fnc_safeopen","life_fnc_safeopen_meta","life_fnc_safetake","life_fnc_safetake_meta",
"life_fnc_savegear","life_fnc_savegear_meta","life_fnc_say3d","life_fnc_say3d_meta","life_fnc_searchaction","life_fnc_searchaction_meta","life_fnc_searchclient","life_fnc_searchclient_meta","life_fnc_searchposempty","life_fnc_searchposempty_meta","life_fnc_searchvehaction","life_fnc_searchvehaction_meta","life_fnc_seizeclient","life_fnc_seizeclient_meta","life_fnc_seizeplayeraction",
"life_fnc_savegear","life_fnc_savegear_meta","life_fnc_say3d","life_fnc_say3d_meta","life_fnc_searchaction","life_fnc_searchaction_meta","life_fnc_searchclient","life_fnc_searchclient_meta","life_fnc_searchvehaction","life_fnc_searchvehaction_meta","life_fnc_seizeclient","life_fnc_seizeclient_meta","life_fnc_seizeplayeraction",
"life_fnc_seizeplayeraction_meta","life_fnc_sellgarage","life_fnc_sellgarage_meta","life_fnc_sellhouse","life_fnc_sellhouse_meta","life_fnc_sellhousegarage","life_fnc_sellhousegarage_meta","life_fnc_servicechopper","life_fnc_servicechopper_meta","life_fnc_setfuel","life_fnc_setfuel_meta","life_fnc_setmapposition","life_fnc_setmapposition_meta","life_fnc_settexture_meta","life_fnc_settingsmenu",
"life_fnc_settingsmenu_meta","life_fnc_setupactions","life_fnc_setupactions_meta","life_fnc_setupevh","life_fnc_setupevh_meta","life_fnc_simdisable","life_fnc_simdisable_meta","life_fnc_sirenlights","life_fnc_sirenlights_meta","life_fnc_sounddevice","life_fnc_sounddevice_meta","life_fnc_spawnconfirm","life_fnc_spawnconfirm_meta","life_fnc_spawnmenu","life_fnc_spawnmenu_meta","life_fnc_spawnpointcfg",
"life_fnc_spawnpointcfg_meta","life_fnc_spawnpointselected","life_fnc_spawnpointselected_meta","life_fnc_spikestrip","life_fnc_spikestrip_meta","life_fnc_spikestripeffect","life_fnc_spikestripeffect_meta","life_fnc_stopescorting","life_fnc_stopescorting_meta","life_fnc_storagebox","life_fnc_storagebox_meta","life_fnc_storevehicle","life_fnc_storevehicle_meta","life_fnc_storevehicleaction",
"life_fnc_storevehicleaction_meta","life_fnc_stripdownplayer","life_fnc_stripdownplayer_meta","life_fnc_surrender","life_fnc_surrender_meta","life_fnc_survival","life_fnc_survival_meta","life_fnc_tazed","life_fnc_tazed_meta","life_fnc_teleport","life_fnc_teleport_meta","life_fnc_ticketaction","life_fnc_ticketaction_meta","life_fnc_ticketgive",
"life_fnc_ticketgive_meta","life_fnc_ticketpaid","life_fnc_ticketpaid_meta","life_fnc_ticketpay","life_fnc_ticketpay_meta","life_fnc_ticketprompt","life_fnc_ticketprompt_meta","life_fnc_unimpound","life_fnc_unimpound_meta","life_fnc_unrestrain","life_fnc_unrestrain_meta","life_fnc_updateviewdistance","life_fnc_updateviewdistance_meta","life_fnc_useitem","life_fnc_useitem_meta",
"life_fnc_vehicleanimate","life_fnc_vehicleanimate_meta","life_fnc_vehiclecolor3drefresh","life_fnc_vehiclecolor3drefresh_meta","life_fnc_vehiclecolorcfg","life_fnc_vehiclecolorcfg_meta","life_fnc_vehiclecolorstr","life_fnc_vehiclecolorstr_meta","life_fnc_vehiclegarage","life_fnc_vehiclegarage_meta","life_fnc_vehiclelistcfg","life_fnc_vehiclelistcfg_meta","life_fnc_vehicleowners",
"life_fnc_vehicleowners_meta","life_fnc_vehicleshop3dpreview","life_fnc_vehicleshop3dpreview_meta","life_fnc_vehicleshopbuy","life_fnc_vehicleshopbuy_meta","life_fnc_vehicleshopend3dpreview","life_fnc_vehicleshopend3dpreview_meta","life_fnc_vehicleshopinit3dpreview","life_fnc_vehicleshopinit3dpreview_meta","life_fnc_vehicleshoplbchange","life_fnc_vehicleshoplbchange_meta",
"life_fnc_vehicleowners_meta","life_fnc_3dpreviewdisplay","life_fnc_3dpreviewdisplay_meta","life_fnc_vehicleshopbuy","life_fnc_vehicleshopbuy_meta","life_fnc_3dpreviewexit","life_fnc_3dpreviewexit_meta","life_fnc_3dpreviewinit","life_fnc_3dpreviewinit_meta","life_fnc_vehicleshoplbchange","life_fnc_vehicleshoplbchange_meta",
"life_fnc_vehicleshopmenu","life_fnc_vehicleshopmenu_meta","life_fnc_vehicleweight","life_fnc_vehicleweight_meta","life_fnc_vehicleweightcfg","life_fnc_vehicleweightcfg_meta","life_fnc_vehinventory","life_fnc_vehinventory_meta","life_fnc_vehinvsearch","life_fnc_vehinvsearch_meta","life_fnc_vehshoplicenses","life_fnc_vehshoplicenses_meta","life_fnc_vehstoreitem","life_fnc_vehstoreitem_meta",
"life_fnc_vehtakeitem","life_fnc_vehtakeitem_meta","life_fnc_vinteractionmenu","life_fnc_vinteractionmenu_meta","life_fnc_virt_buy","life_fnc_virt_buy_meta","life_fnc_virt_menu","life_fnc_virt_menu_meta","life_fnc_virt_sell","life_fnc_virt_sell_meta","life_fnc_virt_update","life_fnc_virt_update_meta","life_fnc_wantedadd","life_fnc_wantedadd_meta","life_fnc_wantedaddp","life_fnc_wantedaddp_meta",
"life_fnc_wantedbounty","life_fnc_wantedbounty_meta","life_fnc_wantedfetch","life_fnc_wantedfetch_meta","life_fnc_wantedgrab","life_fnc_wantedgrab_meta","life_fnc_wantedinfo","life_fnc_wantedinfo_meta","life_fnc_wantedlist","life_fnc_wantedlist_meta","life_fnc_wantedmenu","life_fnc_wantedmenu_meta","life_fnc_wantedperson","life_fnc_wantedperson_meta","life_fnc_wantedpunish","life_fnc_wantedpunish_meta",
Expand Down Expand Up @@ -313,8 +313,8 @@ class SpyGlass {
{ "advanced_log", "STRING" }, { "money_log", "STRING" }, { "life_markers_Vehicles", "ARRAY" }, { "life_markers_Players", "ARRAY" },{ "vehiclefuellist", "ARRAY" }, { "life_vinact_curtarget", "OBJECT" }, { "life_ticket_cop", "OBJECT" }, { "life_ticket_unit", "OBJECT" }, { "life_ticket_val", "SCALAR" }, { "life_ticket_paid", "BOOL" }, { "life_boltcutter_uses", "SCALAR" }, { "life_pinact_container", "OBJECT" },
{ "luce_1", "SCRIPT" }, { "life_bail_amount", "SCALAR" }, { "life_canpay_bail", "BOOL" }, { "hc_life", "SCALAR" }, { "life_fnc_requestclientid", "OBJECT" }, { "life_hc_isactive", "BOOL" }, { "ton_fnc_playtime_values", "ARRAY" }, { "ton_fnc_playtime_values_request", "ARRAY" }, { "hc_1", "OBJECT" }, { "hc_life", "BOOL" }, { "rscdisplaympinterrupt_respawntime", "SCALAR" }, { "bis_dynamictext_spawn_8", "SCRIPT" },
{ "life_my_gang", "OBJECT" }, {"am_exit","SCALAR"}, { "life_garage_sp", "ARRAY" }, { "life_garage_sp", "STRING" }, { "0", "ARRAY" }, { "life_oldvestitems", "ARRAY" }, { "life_shop_cam", "OBJECT" }, { "life_oldclothes", "STRING" }, { "life_cmenu_lock", "BOOL" }, { "life_oldhat", "STRING" }, { "life_oldvest", "STRING" }, { "life_oldglasses", "STRING" }, { "life_oldbackpackitems","ARRAY"},
{"life_oldbackpack","STRING"}, { "rscnotification_data", "ARRAY" }, { "life_curwep_h", "STRING" }, { "carshop_lux_1", "OBJECT" }, { "life_olduniformitems", "ARRAY" }, { "bis_fnc_setvehiclemass_fsm", "SCALAR" }, { "life_preview_light", "OBJECT" }, { "life_attachment_point", "OBJECT" }, { "life_preview_3d_vehicle_cam", "OBJECT" }, { "life_preview_3d_vehicle_object", "OBJECT" }, { "life_pos_exist", "BOOL" },
{ "life_pos_attach", "ARRAY" }, { "life_inv_", "SCALAR" }, { "life_markers", "BOOL" }, { "life_markers_active", "BOOL" }, { "life_frozen", "BOOL" }, { "life_settings_revealobjects", "BOOL" }, { "life_inv_rooster", "SCALAR" }, { "station_shop_09", "OBJECT" }, { "station_shop_08", "OBJECT" }, { "station_shop_07", "OBJECT" }, { "station_shop_06", "OBJECT" }, { "station_shop_04", "OBJECT" }, { "life_disable_getout", "BOOL" },
{"life_oldbackpack","STRING"}, { "rscnotification_data", "ARRAY" }, { "life_curwep_h", "STRING" }, { "carshop_lux_1", "OBJECT" }, { "life_olduniformitems", "ARRAY" }, { "bis_fnc_setvehiclemass_fsm", "SCALAR" }, { "life_3dPreview_light", "OBJECT" }, { "life_3dPreview_camera", "OBJECT" }, { "life_3dPreview_object", "OBJECT" },
{ "life_3dPreview_position", "ARRAY" }, {"life_3dPreview_camera_mag", "SCALAR"}, {"life_3dPreview_camera_zoom", "SCALAR"}, {"life_3dPreview_camera_target", "ARRAY"}, {"life_3dPreview_object", "OBJECT"}, {"life_3dPreview_dragging", "BOOL"}, {"life_3dPreview_evh_down", "SCALAR"}, {"life_3dPreview_evh_up", "SCALAR"}, {"life_3dPreview_evh_move", "SCALAR"}, {"life_3dPreview_evh_zoom", "SCALAR"}, { "life_inv_", "SCALAR" }, { "life_markers", "BOOL" }, { "life_markers_active", "BOOL" }, { "life_frozen", "BOOL" }, { "life_settings_revealobjects", "BOOL" }, { "life_inv_rooster", "SCALAR" }, { "station_shop_09", "OBJECT" }, { "station_shop_08", "OBJECT" }, { "station_shop_07", "OBJECT" }, { "station_shop_06", "OBJECT" }, { "station_shop_04", "OBJECT" }, { "life_disable_getout", "BOOL" },
{ "bis_taskenhancements_3d", "BOOL" }, { "life_settings_enablenewsbroadcast", "BOOL" }, { "life_settings_enablesidechannel", "BOOL" }, { "life_isknocked", "BOOL" }, { "life_settings_viewdistancecar", "SCALAR" }, { "life_save_gear", "ARRAY" }, { "life_settings_viewdistanceair", "SCALAR" }, { "life_disable_getin", "BOOL" }, { "life_god", "BOOL" }, { "station_shop_3", "OBJECT" }, { "station_shop_2", "OBJECT" },
{ "station_shop_1", "OBJECT" }, { "station_shop_24", "OBJECT" }, { "station_shop_23", "OBJECT" }, { "station_shop_22", "OBJECT" }, { "station_shop_21", "OBJECT" }, { "station_shop_20", "OBJECT" }, { "life_settings_viewdistancefoot", "SCALAR" }, { "life_settings_tagson", "BOOL" }, { "station_shop_19", "OBJECT" }, { "bis_taskenhancements_enable", "BOOL" }, { "station_shop_18", "OBJECT" }, { "station_shop_17", "OBJECT" },
{ "life_container_activeobj", "OBJECT" }, { "station_shop_16", "OBJECT" }, { "station_shop_15", "OBJECT" }, { "station_shop_14", "OBJECT" }, { "station_shop_13", "OBJECT" }, { "station_shop_12", "OBJECT" }, { "station_shop_11", "OBJECT" }, { "station_shop_10", "OBJECT" }, { "life_progress", "DISPLAY" }, { "life_veh_shop", "ARRAY" }, { "bis_fnc_feedback_deltadamage", "SCALAR" }, { "life_clothing_store", "STRING" },
Expand Down
27 changes: 11 additions & 16 deletions Altis_Life.Altis/core/configuration.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -40,34 +40,29 @@ life_container_activeObj = objNull;
life_disable_getIn = false;
life_disable_getOut = false;
life_admin_debug = false;
life_preview_3D_vehicle_cam = objNull;
life_preview_3D_vehicle_object = objNull;
life_preview_light = objNull;
life_pos_exist = false;
life_pos_attach = [];
life_civ_position = [];
life_markers = false;
life_markers_active = false;
life_canpay_bail = true;
life_storagePlacing = scriptNull;

//Settings
life_settings_enableNewsBroadcast = profileNamespace getVariable ["life_enableNewsBroadcast",true];
life_settings_enableSidechannel = profileNamespace getVariable ["life_enableSidechannel",true];
life_settings_tagson = profileNamespace getVariable ["life_settings_tagson",true];
life_settings_revealObjects = profileNamespace getVariable ["life_settings_revealObjects",true];
life_settings_viewDistanceFoot = profileNamespace getVariable ["life_viewDistanceFoot",1250];
life_settings_viewDistanceCar = profileNamespace getVariable ["life_viewDistanceCar",1250];
life_settings_viewDistanceAir = profileNamespace getVariable ["life_viewDistanceAir",1250];
life_settings_enableNewsBroadcast = profileNamespace getVariable ["life_enableNewsBroadcast", true];
life_settings_enableSidechannel = profileNamespace getVariable ["life_enableSidechannel", true];
life_settings_tagson = profileNamespace getVariable ["life_settings_tagson", true];
life_settings_revealObjects = profileNamespace getVariable ["life_settings_revealObjects", true];
life_settings_viewDistanceFoot = profileNamespace getVariable ["life_viewDistanceFoot", 1250];
life_settings_viewDistanceCar = profileNamespace getVariable ["life_viewDistanceCar", 1250];
life_settings_viewDistanceAir = profileNamespace getVariable ["life_viewDistanceAir", 1250];

//Uniform price (0),Hat Price (1),Glasses Price (2),Vest Price (3),Backpack Price (4)
life_clothing_purchase = [-1,-1,-1,-1,-1];
life_clothing_purchase = [-1, -1, -1, -1, -1];
/*
*****************************
****** Weight Variables *****
*****************************
*/
life_maxWeight = LIFE_SETTINGS(getNumber,"total_maxWeight");
life_maxWeight = LIFE_SETTINGS(getNumber, "total_maxWeight");
life_carryWeight = 0; //Represents the players current inventory weight (MUST START AT 0).

/*
Expand All @@ -93,13 +88,13 @@ life_vehicles = [];
*/
//Setup variable inv vars.
{
missionNamespace setVariable [ITEM_VARNAME(configName _x),0];
missionNamespace setVariable [ITEM_VARNAME(configName _x), 0];
} forEach ("true" configClasses (missionConfigFile >> "VirtualItems"));

/* Setup the BLAH! */
{
_varName = getText(_x >> "variable");
_sideFlag = getText(_x >> "side");

missionNamespace setVariable [LICENSE_VARNAME(_varName,_sideFlag),false];
missionNamespace setVariable [LICENSE_VARNAME(_varName,_sideFlag), false];
} forEach ("true" configClasses (missionConfigFile >> "Licenses"));
33 changes: 0 additions & 33 deletions Altis_Life.Altis/core/functions/fn_searchPosEmpty.sqf

This file was deleted.

33 changes: 33 additions & 0 deletions Altis_Life.Altis/core/shops/fn_3dPreviewDisplay.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
File: fn_3dPreviewDisplay.sqf
Author: KLM
Description:
Called to change the object in the 3d preview.
*/

if !(params [["_className", "", [""]]]) exitWith {};

if (isNil "life_3dPreview_camera" || {isNull life_3dPreview_camera}) exitWith {};

private _isInCfg = (isClass (configFile >> "CfgVehicles" >> _className));
if (_isInCfg) then {
if (isNull life_3dPreview_object || {!(_className isEqualTo typeOf life_3dPreview_object)}) then {
if (!isNull life_3dPreview_object) then {deleteVehicle life_3dPreview_object;};
private _object = _className createVehicleLocal [0, 0, 0];
if (isNull _object) exitWith {diag_log format ["3dPreview - problem creating object: %1", _className]};
life_3dPreview_object = _object;
life_3dPreview_object enableSimulation false;
life_3dPreview_object setPos life_3dPreview_position;
life_3dPreview_object setVectorUp [0, 0, 1];
private _bodyDiagonal = [boundingBoxReal _object select 0 select 0, boundingBoxReal _object select 0 select 2] distance [boundingBoxReal _object select 1 select 0, boundingBoxReal _object select 1 select 2];
private _distance = _bodyDiagonal * 2;
life_3dPreview_camera_target = getPos _object;
life_3dPreview_camera camSetTarget life_3dPreview_camera_target;
life_3dPreview_camera camSetPos (_object modelToWorld [0, _distance, _distance * 0.3]);
life_3dPreview_camera setVectorUp [0, 0, 1];
life_3dPreview_camera camCommit 0;
life_3dPreview_camera_mag = vectorMagnitude (life_3dPreview_object worldToModel (getPos life_3dpreview_camera));
life_3dPreview_camera_zoom = life_3dPreview_camera_mag;
};
};
33 changes: 33 additions & 0 deletions Altis_Life.Altis/core/shops/fn_3dPreviewExit.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
File: fn_3dPreviewExit.sqf
Author: KLM
Description:
Handles the cleanup of the 3d preview.
*/

if !(params [["_display", displayNull, [displayNull]]]) exitWith {};

// delete objects
if (!isNull life_3dPreview_object) then {deleteVehicle life_3dPreview_object;};
deleteVehicle life_3dPreview_light;
life_3dPreview_camera cameraEffect ["Terminate", "BACK"];
camDestroy life_3dPreview_camera;
// nil variables
life_3dPreview_position = nil;
life_3dPreview_object = nil;
life_3dPreview_light = nil;
life_3dPreview_camera = nil;
life_3dPreview_camera_mag = nil;
life_3dPreview_camera_zoom = nil;
life_3dPreview_camera_target = nil;
life_3dPreview_dragging = nil;
// remove event handlers
_display displayRemoveEventHandler ["MouseButtonDown", life_3dPreview_evh_down];
life_3dPreview_evh_down = nil;
_display displayRemoveEventHandler ["MouseButtonUp", life_3dPreview_evh_up];
life_3dPreview_evh_up = nil;
_display displayRemoveEventHandler ["MouseMoving", life_3dPreview_evh_move];
life_3dPreview_evh_move = nil;
_display displayRemoveEventHandler ["MouseZChanged", life_3dPreview_evh_zoom];
life_3dPreview_evh_zoom = nil;
Loading

0 comments on commit 40d5479

Please sign in to comment.