Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
704 changes: 352 additions & 352 deletions AL.ini

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion Altis_Life.Altis/CfgRemoteExec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ class CfgRemoteExec {
F(TON_fnc_addContainer,SERVER)
F(TON_fnc_addHouse,SERVER)
F(TON_fnc_chopShopSell,SERVER)
F(TON_fnc_cleanupRequest,SERVER)
F(TON_fnc_deleteDBContainer,SERVER)
F(TON_fnc_getID,SERVER)
F(TON_fnc_getVehicles,SERVER)
Expand Down
2 changes: 1 addition & 1 deletion Altis_Life.Altis/config/Config_SpyGlass.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,4 +381,4 @@ class SpyGlass {
{"gui_displays","ARRAY"},{"rscdisplaysinglemission_script","CODE"},{"rscdisplaynewuser_script","CODE"},{"rscdisplayloading_last","ARRAY"},{"rscdisplayconfigure_script","CODE"},{"rscdisplayarcademap_script","CODE"},{"rscdisplaycontrolschemes_script","CODE"},{"rscdisplayarcadewaypoint_script","CODE"},{"rscdisplaymission","DISPLAY"},{"rscdisplayinterruptrevert_script","CODE"},{"bis_functions_listrecompile","CODE"},
{"life_sql_id","CODE"},{"rscdisplaydebriefing","DISPLAY"},{"rscdisplaymicsensitivityoptions_script","CODE"},{"rscdiary_playeralpha","SCALAR"}
};
};
};
1 change: 0 additions & 1 deletion Altis_Life.Altis/core/configuration.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ life_carryWeight = 0; //Represents the players current inventory weight (MUST ST
life_net_dropped = false;
life_use_atm = true;
life_is_arrested = false;
life_is_alive = false;
life_delivery_in_progress = false;
life_thirst = 100;
life_hunger = 100;
Expand Down
8 changes: 4 additions & 4 deletions Altis_Life.Altis/core/fn_initCiv.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ civ_spawn_3 = nearestObjects[getMarkerPos "civ_spawn_3", _spawnBuildings,350];
civ_spawn_4 = nearestObjects[getMarkerPos "civ_spawn_4", _spawnBuildings,350];

waitUntil {!(isNull (findDisplay 46))};
if (life_is_alive && !life_is_arrested) then {
life_civ_position params ["_alive","_position"];
if (_alive && !life_is_arrested) then {
/* Spawn at our last position */
player setVehiclePosition [life_civ_position, [], 0, "CAN_COLLIDE"];
player setVehiclePosition [_position, [], 0, "CAN_COLLIDE"];
} else {
if (!life_is_alive && !life_is_arrested) then {
if (!_alive && !life_is_arrested) then {
if (LIFE_SETTINGS(getNumber,"save_civilian_positionStrict") isEqualTo 1) then {
[] call life_fnc_startLoadout;
CASH = 0;
Expand All @@ -36,4 +37,3 @@ if (life_is_alive && !life_is_arrested) then {
};
};
};
life_is_alive = true;
6 changes: 3 additions & 3 deletions Altis_Life.Altis/core/functions/fn_onGameInterrupt.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ private _saveButton = _display displayCtrl 103;
private _topButton = _display displayCtrl 2;

_abortButton ctrlEnable false;
_abortButton buttonSetAction "call SOCK_fnc_updateRequest; [player] remoteExec [""TON_fnc_cleanupRequest"",2];";
_abortButton buttonSetAction "call SOCK_fnc_updateRequest";
_fieldManual ctrlEnable false;
_saveButton ctrlEnable false;

Expand Down Expand Up @@ -43,5 +43,5 @@ if (_conditions) then {
_abortButton ctrlEnable true;
};
} else {
_respawnButton ctrlEnable false;
};
_respawnButton ctrlEnable false;
};
6 changes: 1 addition & 5 deletions Altis_Life.Altis/core/medical/fn_onPlayerKilled.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,9 @@ life_hunger = 100;
life_thirst = 100;
life_carryWeight = 0;
CASH = 0;
life_is_alive = false;

[] call life_fnc_hudUpdate; //Get our HUD updated.
[player,life_settings_enableSidechannel,playerSide] remoteExecCall ["TON_fnc_manageSC",RSERV];

[0] call SOCK_fnc_updatePartial;
[3] call SOCK_fnc_updatePartial;
if (playerSide isEqualTo civilian) then {
[4] call SOCK_fnc_updatePartial;
};
[3] call SOCK_fnc_updatePartial;
1 change: 0 additions & 1 deletion Altis_Life.Altis/core/medical/fn_revived.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ life_corpse setVariable ["name",nil,true];
deleteVehicle life_corpse;

life_action_inUse = false;
life_is_alive = true;

player setVariable ["Revive",nil,true];
player setVariable ["name",nil,true];
Expand Down
226 changes: 112 additions & 114 deletions Altis_Life.Altis/core/session/fn_requestReceived.sqf
Original file line number Diff line number Diff line change
@@ -1,114 +1,112 @@
#include "..\..\script_macros.hpp"
/*
File: fn_requestReceived.sqf
Author: Bryan "Tonic" Boardwine

Description:
Called by the server saying that we have a response so let's
sort through the information, validate it and if all valid
set the client up.
*/

private _count = count _this;
life_session_tries = life_session_tries + 1;
if (life_session_completed) exitWith {}; //Why did this get executed when the client already initialized? Fucking arma...
if (life_session_tries > 3) exitWith {cutText[localize "STR_Session_Error","BLACK FADED"]; 0 cutFadeOut 999999999;};

0 cutText [localize "STR_Session_Received","BLACK FADED"];
0 cutFadeOut 9999999;

//Error handling and junk..
if (isNil "_this") exitWith {[] call SOCK_fnc_insertPlayerInfo;};
if (_this isEqualType "") exitWith {[] call SOCK_fnc_insertPlayerInfo;};
if (count _this isEqualTo 0) exitWith {[] call SOCK_fnc_insertPlayerInfo;};
if ((_this select 0) isEqualTo "Error") exitWith {[] call SOCK_fnc_insertPlayerInfo;};
if (!(getPlayerUID player isEqualTo (_this select 0))) exitWith {[] call SOCK_fnc_dataQuery;};

//Lets make sure some vars are not set before hand.. If they are get rid of them, hopefully the engine purges past variables but meh who cares.
if (!isServer && (!isNil "life_adminlevel" || !isNil "life_coplevel" || !isNil "life_donorlevel")) exitWith {
[profileName,getPlayerUID player,"VariablesAlreadySet"] remoteExecCall ["SPY_fnc_cookieJar",RSERV];
[profileName,format ["Variables set before client initialization...\nlife_adminlevel: %1\nlife_coplevel: %2\nlife_donorlevel: %3",life_adminlevel,life_coplevel,life_donorlevel]] remoteExecCall ["SPY_fnc_notifyAdmins",RCLIENT];
sleep 0.9;
failMission "SpyGlass";
};

//Parse basic player information.
CASH = _this select 2;
BANK = _this select 3;
CONST(life_adminlevel,(_this select 4));
if (LIFE_SETTINGS(getNumber,"donor_level") isEqualTo 1) then {
CONST(life_donorlevel,(_this select 5));
} else {
CONST(life_donorlevel,0);
};

//Loop through licenses
if !((_this select 6) isEqualTo []) then {
{missionNamespace setVariable [(_x select 0),(_x select 1)];} forEach (_this select 6);
};

//Parse side specific information.
switch (playerSide) do {
case west: {
CONST(life_coplevel,(_this select 7));
CONST(life_medicLevel,0);
life_blacklisted = _this select 9;
if (LIFE_SETTINGS(getNumber,"save_playerStats") isEqualTo 1) then {
life_hunger = ((_this select 10) select 0);
life_thirst = ((_this select 10) select 1);
player setDamage ((_this select 10) select 2);
};
};

case civilian: {
life_is_arrested = _this select 7;
CONST(life_coplevel, 0);
CONST(life_medicLevel, 0);
life_houses = _this select (_count - 3);
if (LIFE_SETTINGS(getNumber,"save_playerStats") isEqualTo 1) then {
life_hunger = ((_this select 9) select 0);
life_thirst = ((_this select 9) select 1);
player setDamage ((_this select 9) select 2);
};

//Position
if (LIFE_SETTINGS(getNumber,"save_civilian_position") isEqualTo 1) then {
life_is_alive = _this select 10;
life_civ_position = _this select 11;
if (life_is_alive) then {
if !(count life_civ_position isEqualTo 3) then {diag_log format ["[requestReceived] Bad position received. Data: %1",life_civ_position];life_is_alive =false;};
if (life_civ_position distance (getMarkerPos "respawn_civilian") < 300) then {life_is_alive = false;};
};
};

{
_house = nearestObject [(call compile format ["%1",(_x select 0)]), "House"];
life_vehicles pushBack _house;
} forEach life_houses;

life_gangData = _this select (_count - 2);
if !(life_gangData isEqualTo []) then {
[] spawn life_fnc_initGang;
};
[] spawn life_fnc_initHouses;
};

case independent: {
CONST(life_medicLevel,(_this select 7));
CONST(life_coplevel,0);
if (LIFE_SETTINGS(getNumber,"save_playerStats") isEqualTo 1) then {
life_hunger = ((_this select 9) select 0);
life_thirst = ((_this select 9) select 1);
player setDamage ((_this select 9) select 2);
};
};
};

life_gear = _this select 8;
[true] call life_fnc_loadGear;

if !((_this select (_count - 1)) isEqualTo []) then {
{life_vehicles pushBack _x;} forEach (_this select (_count - 1));
};

life_session_completed = true;
#include "..\..\script_macros.hpp"
/*
File: fn_requestReceived.sqf
Author: Bryan "Tonic" Boardwine

Description:
Called by the server saying that we have a response so let's
sort through the information, validate it and if all valid
set the client up.
*/

private _count = count _this;
life_session_tries = life_session_tries + 1;
if (life_session_completed) exitWith {}; //Why did this get executed when the client already initialized? Fucking arma...
if (life_session_tries > 3) exitWith {cutText[localize "STR_Session_Error","BLACK FADED"]; 0 cutFadeOut 999999999;};

0 cutText [localize "STR_Session_Received","BLACK FADED"];
0 cutFadeOut 9999999;

//Error handling and junk..
if (isNil "_this") exitWith {[] call SOCK_fnc_insertPlayerInfo;};
if (_this isEqualType "") exitWith {[] call SOCK_fnc_insertPlayerInfo;};
if (count _this isEqualTo 0) exitWith {[] call SOCK_fnc_insertPlayerInfo;};
if ((_this select 0) isEqualTo "Error") exitWith {[] call SOCK_fnc_insertPlayerInfo;};
if (!(getPlayerUID player isEqualTo (_this select 0))) exitWith {[] call SOCK_fnc_dataQuery;};

//Lets make sure some vars are not set before hand.. If they are get rid of them, hopefully the engine purges past variables but meh who cares.
if (!isServer && (!isNil "life_adminlevel" || !isNil "life_coplevel" || !isNil "life_donorlevel")) exitWith {
[profileName,getPlayerUID player,"VariablesAlreadySet"] remoteExecCall ["SPY_fnc_cookieJar",RSERV];
[profileName,format ["Variables set before client initialization...\nlife_adminlevel: %1\nlife_coplevel: %2\nlife_donorlevel: %3",life_adminlevel,life_coplevel,life_donorlevel]] remoteExecCall ["SPY_fnc_notifyAdmins",RCLIENT];
sleep 0.9;
failMission "SpyGlass";
};

//Parse basic player information.
CASH = _this select 2;
BANK = _this select 3;
CONST(life_adminlevel,(_this select 4));
if (LIFE_SETTINGS(getNumber,"donor_level") isEqualTo 1) then {
CONST(life_donorlevel,(_this select 5));
} else {
CONST(life_donorlevel,0);
};

//Loop through licenses
if !((_this select 6) isEqualTo []) then {
{missionNamespace setVariable [(_x select 0),(_x select 1)];} forEach (_this select 6);
};

//Parse side specific information.
switch (playerSide) do {
case west: {
CONST(life_coplevel,(_this select 7));
CONST(life_medicLevel,0);
life_blacklisted = _this select 9;
if (LIFE_SETTINGS(getNumber,"save_playerStats") isEqualTo 1) then {
life_hunger = ((_this select 10) select 0);
life_thirst = ((_this select 10) select 1);
player setDamage ((_this select 10) select 2);
};
};

case civilian: {
life_is_arrested = _this select 7;
CONST(life_coplevel, 0);
CONST(life_medicLevel, 0);
life_houses = _this select (_count - 3);
if (LIFE_SETTINGS(getNumber,"save_playerStats") isEqualTo 1) then {
life_hunger = ((_this select 9) select 0);
life_thirst = ((_this select 9) select 1);
player setDamage ((_this select 9) select 2);
};

//Position
if (LIFE_SETTINGS(getNumber,"save_civilian_position") isEqualTo 1) then {
life_civ_position = [_this select 10,_this select 11];
if !(life_civ_position isEqualTo []) then {
if (life_civ_position distance (getMarkerPos "respawn_civilian") < 300) then {life_civ_position = []};
};
};

{
_house = nearestObject [(call compile format ["%1",(_x select 0)]), "House"];
life_vehicles pushBack _house;
} forEach life_houses;

life_gangData = _this select (_count - 2);
if !(life_gangData isEqualTo []) then {
[] spawn life_fnc_initGang;
};
[] spawn life_fnc_initHouses;
};

case independent: {
CONST(life_medicLevel,(_this select 7));
CONST(life_coplevel,0);
if (LIFE_SETTINGS(getNumber,"save_playerStats") isEqualTo 1) then {
life_hunger = ((_this select 9) select 0);
life_thirst = ((_this select 9) select 1);
player setDamage ((_this select 9) select 2);
};
};
};

life_gear = _this select 8;
[true] call life_fnc_loadGear;

if !((_this select (_count - 1)) isEqualTo []) then {
{life_vehicles pushBack _x;} forEach (_this select (_count - 1));
};

life_session_completed = true;
Loading