Skip to content

Commit

Permalink
add support for A3W_vehicle_saveInterval, and A3W_object_saveInterval…
Browse files Browse the repository at this point in the history
… ... used to control the loop interval for save operations
  • Loading branch information
micovery committed Oct 22, 2014
1 parent 3ef5a9a commit 0acdcfe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion persistence/world/oFunctions.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -552,10 +552,14 @@ o_saveAllObjects = {_this spawn {
diag_log format ["A3W - %1 objects have been saved", _count];
};};


o_saveLoop_interval = OR(A3W_object_saveInterval,60);
diag_log format["config: A3W_object_saveInterval = %1", o_saveLoop_interval];

o_saveLoop = {
ARGVX3(0,_scope,"");
while {true} do {
sleep 30;
sleep o_saveLoop_interval;
diag_log format["saving all objects"];
[_scope] call o_saveInfo;
[_scope] call o_saveAllObjects;
Expand Down
6 changes: 5 additions & 1 deletion persistence/world/vFunctions.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -473,10 +473,14 @@ v_saveAllVechiles = {_this spawn {
diag_log format ["A3W - %1 vehicles have been saved", _count];
};};

v_saveLoop_interval = OR(A3W_vehicle_saveInterval,60);
diag_log format["config: A3W_vehicle_saveInterval = %1", v_saveLoop_interval];


v_saveLoop = {
ARGVX3(0,_scope,"");
while {true} do {
sleep 60;
sleep v_saveLoop_interval;
[_scope] call v_saveAllVechiles;
};
};
Expand Down

0 comments on commit 0acdcfe

Please sign in to comment.