mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
[FIX] Inventory wiping
dayz_Magazines isn't always set before syncing the character, and especially considering this is just on a loop makes it very unreliable. If you input an empty array to the server_playerSync then it will wipe your backpack and weapons aswell. Noticed this bug when players were complaining about it since I switched completely over to extDB. I've taken a look at the HiveExt.dll source and I'm pretty sure I found a check in there to see if the array is empty, which is still a hacky fix for this. I honestly wonder what the devs of DayZ were doing when they made this mod, honestly the coding is horrendous. I honestly just feel like making my own version of it from scratch sometimes. Rant over... sorry lol. Back on topic, using magazines player won't record the clip count in a magazine, but the only time that actually seems to be saved is when the gear dialog is closed because that's the only time you can record it using the gearIDC commands.
This commit is contained in:
@@ -206,11 +206,10 @@ while {true} do {
|
||||
//Save Checker
|
||||
if (dayz_unsaved) then {
|
||||
if ((time - dayz_lastSave) > DZE_SaveTime) then {
|
||||
PVDZE_plr_Save = [player,dayz_Magazines,false,false];
|
||||
PVDZE_plr_Save = [player,magazines player,false,false];
|
||||
publicVariableServer "PVDZE_plr_Save";
|
||||
dayz_unsaved = false;
|
||||
dayz_lastSave = time;
|
||||
dayz_Magazines = [];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user