Skip to content

Commit

Permalink
Merge pull request #2124 from EpochModTeam/master
Browse files Browse the repository at this point in the history
Update 1.0.7 Branch
  • Loading branch information
AirwavesMan authored Apr 16, 2021
2 parents a4ce61e + e8f2f3f commit 588d7fb
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion SQF/dayz_code/actions/pickupActions/object_pickup.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ if (_classname isKindOf "Bag_Base_EP1") exitWith {
waitUntil { !isNull (unitBackpack player) };
uiSleep 0.03;

call player_regularSave;
call player_forceSave;
};

_config = (configFile >> _type >> _classname);
Expand Down
2 changes: 1 addition & 1 deletion SQF/dayz_code/actions/player_sleep.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,5 @@ player setVariable ["sleeping",false];
dayz_actionInProgress = false;

//Removed due to player sync returning []
//call player_regularSave;
//call player_forceSave;
R3F_TIRED_Accumulator = 0;
2 changes: 1 addition & 1 deletion SQF/dayz_code/actions/pzombie/pz_feed.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ if !(alive _item) then {
dayz_lastMeal = time;
dayz_hunger = 0;

call player_regularSave;
call player_forceSave;

[player,"eat",0,false] call dayz_zombieSpeak;

Expand Down
2 changes: 1 addition & 1 deletion SQF/dayz_code/compile/keyboard.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if (isNil "keyboard_keys") then {
};
local _dze_q = {
if (!_ctrlState && !_altState) then {DZE_Q = true;};
if (!_ctrlState && {_altState}) then {DZE_Q_alt = true;};
if (!_ctrlState && _altState) then {DZE_Q_alt = true;};
if (_ctrlState && !_altState) then {DZE_Q_ctrl = true;};
};
local _dze_z = {
Expand Down
10 changes: 5 additions & 5 deletions SQF/dayz_code/compile/player_forceSave.sqf
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/*
Opens player inventory to save
Do not use this in constant running loops or actions. force_Save opens the inventory with a dialog call.
That will interrupt actions like shooting. For loops use player_regularSave but keep in mind player_regularSave does not save the ammo count.
*/

_magazineArray = [] call player_countMagazines;
local _magazineArray = [] call player_countMagazines;

if ((count _magazineArray) > 0) then {
PVDZ_plr_Save = [player, if (player isKindOf "PZombie_VB") then {nil} else {_magazineArray},dayz_onBack,weapons player];
publicVariableServer "PVDZ_plr_Save";
};
PVDZ_plr_Save = [player, if (player isKindOf "PZombie_VB") then {nil} else {_magazineArray},dayz_onBack,weapons player];
publicVariableServer "PVDZ_plr_Save";

//diag_log format["Player_forceSave with magazines: %1",_magazineArray];

Expand Down
5 changes: 2 additions & 3 deletions SQF/dayz_code/compile/player_humanityMorph.sqf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
private ["_charID","_model","_old","_humanity","_medical","_worldspace","_zombieKills","_headShots","_humanKills","_combattimeout","_inCombat","_banditKills","_fractures","_survivalTime","_coins","_bankCoins","_globalCoins","_ConfirmedHumanKills","_ConfirmedBanditKills","_friendlies","_tagSetting"];
//_playerUID = _this select 0;
closeDialog 0;
_charID = _this select 1;
_model = _this select 2;

Expand All @@ -13,7 +13,6 @@ _old removeAllEventHandlers "Fired";
_old allowDamage false;
_old AddEventHandler ["HandleDamage", {False}];

dayz_unsaved = true;
//Logout
_humanity = player getVariable ["humanity",0];
_medical = player call player_sumMedical;
Expand Down Expand Up @@ -111,4 +110,4 @@ player allowDamage true;

uiSleep 0.1;
if !(isNull _old) then {deleteVehicle _old;};
call player_forceSave;
call player_forceSave;
8 changes: 5 additions & 3 deletions SQF/dayz_code/compile/player_regularSave.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
Email: N/A
Creation date: 2020-12-30 17:20:00
Last modified time: 2021-03-08 14:04:00
Last modified time: 2021-04-16 09:20:00
Description:
Requests a simple save for the player object.
Requests a simple save for the player object. Does not save the ammo count but it does not interrupt actions like shooting.
Example:
call player_regularSave;
Return:
Nothing
*/

PVDZ_plr_Save = [player,nil,dayz_onBack,weapons player];
local _magazineArray = (magazines player) - ["CSGAS","Hatchet_Swing","Crowbar_Swing","Machete_Swing","Bat_Swing","BatBarbed_Swing","BatNails_Swing","Fishing_Swing","Sledge_Swing"];

PVDZ_plr_Save = [player,_magazineArray,dayz_onBack,weapons player];
publicVariableServer "PVDZ_plr_Save";

0 comments on commit 588d7fb

Please sign in to comment.