Skip to content

Commit 588d7fb

Browse files
authored
Merge pull request #2124 from EpochModTeam/master
Update 1.0.7 Branch
2 parents a4ce61e + e8f2f3f commit 588d7fb

File tree

7 files changed

+16
-15
lines changed

7 files changed

+16
-15
lines changed

SQF/dayz_code/actions/pickupActions/object_pickup.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ if (_classname isKindOf "Bag_Base_EP1") exitWith {
5353
waitUntil { !isNull (unitBackpack player) };
5454
uiSleep 0.03;
5555

56-
call player_regularSave;
56+
call player_forceSave;
5757
};
5858

5959
_config = (configFile >> _type >> _classname);

SQF/dayz_code/actions/player_sleep.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,5 +115,5 @@ player setVariable ["sleeping",false];
115115
dayz_actionInProgress = false;
116116

117117
//Removed due to player sync returning []
118-
//call player_regularSave;
118+
//call player_forceSave;
119119
R3F_TIRED_Accumulator = 0;

SQF/dayz_code/actions/pzombie/pz_feed.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ if !(alive _item) then {
6363
dayz_lastMeal = time;
6464
dayz_hunger = 0;
6565

66-
call player_regularSave;
66+
call player_forceSave;
6767

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

SQF/dayz_code/compile/keyboard.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if (isNil "keyboard_keys") then {
2020
};
2121
local _dze_q = {
2222
if (!_ctrlState && !_altState) then {DZE_Q = true;};
23-
if (!_ctrlState && {_altState}) then {DZE_Q_alt = true;};
23+
if (!_ctrlState && _altState) then {DZE_Q_alt = true;};
2424
if (_ctrlState && !_altState) then {DZE_Q_ctrl = true;};
2525
};
2626
local _dze_z = {

SQF/dayz_code/compile/player_forceSave.sqf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
/*
22
33
Opens player inventory to save
4+
Do not use this in constant running loops or actions. force_Save opens the inventory with a dialog call.
5+
That will interrupt actions like shooting. For loops use player_regularSave but keep in mind player_regularSave does not save the ammo count.
46
57
*/
68

7-
_magazineArray = [] call player_countMagazines;
9+
local _magazineArray = [] call player_countMagazines;
810

9-
if ((count _magazineArray) > 0) then {
10-
PVDZ_plr_Save = [player, if (player isKindOf "PZombie_VB") then {nil} else {_magazineArray},dayz_onBack,weapons player];
11-
publicVariableServer "PVDZ_plr_Save";
12-
};
11+
PVDZ_plr_Save = [player, if (player isKindOf "PZombie_VB") then {nil} else {_magazineArray},dayz_onBack,weapons player];
12+
publicVariableServer "PVDZ_plr_Save";
1313

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

SQF/dayz_code/compile/player_humanityMorph.sqf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
private ["_charID","_model","_old","_humanity","_medical","_worldspace","_zombieKills","_headShots","_humanKills","_combattimeout","_inCombat","_banditKills","_fractures","_survivalTime","_coins","_bankCoins","_globalCoins","_ConfirmedHumanKills","_ConfirmedBanditKills","_friendlies","_tagSetting"];
2-
//_playerUID = _this select 0;
2+
closeDialog 0;
33
_charID = _this select 1;
44
_model = _this select 2;
55

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

16-
dayz_unsaved = true;
1716
//Logout
1817
_humanity = player getVariable ["humanity",0];
1918
_medical = player call player_sumMedical;
@@ -111,4 +110,4 @@ player allowDamage true;
111110

112111
uiSleep 0.1;
113112
if !(isNull _old) then {deleteVehicle _old;};
114-
call player_forceSave;
113+
call player_forceSave;

SQF/dayz_code/compile/player_regularSave.sqf

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@
44
55
Email: N/A
66
Creation date: 2020-12-30 17:20:00
7-
Last modified time: 2021-03-08 14:04:00
7+
Last modified time: 2021-04-16 09:20:00
88
Description:
9-
Requests a simple save for the player object.
9+
Requests a simple save for the player object. Does not save the ammo count but it does not interrupt actions like shooting.
1010
Example:
1111
call player_regularSave;
1212
Return:
1313
Nothing
1414
*/
1515

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

0 commit comments

Comments
 (0)