Skip to content

Commit

Permalink
fixed some oversights
Browse files Browse the repository at this point in the history
  • Loading branch information
AdlerSalbei committed Dec 22, 2018
1 parent cb09624 commit dfdd3e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 3 additions & 3 deletions addons/trenches/functions/fnc_addDigger.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@

params ["_trench", "_unit"];

private _digginPlayers = _trench getVariable [QGVAR(diggingPlayers), []];
private _diggingPlayers = _trench getVariable [QGVAR(diggingPlayers), []];

if (
(count _digginPlayers) < 1
(count _diggingPlayers) < 1
) exitWith {
[_trench, _unit] call FUNC(continueDiggingTrench);
};

_trench setVariable [QGVAR(diggingPlayerst), _digginPlayers pushBackUnique ACE_player, true];
_trench setVariable [QGVAR(diggingPlayers), _diggingPlayers pushBackUnique ACE_player, true];

private _finishCondition = {false};
private _digTime = 0;
Expand Down
6 changes: 1 addition & 5 deletions addons/trenches/functions/fnc_handleDiggingServerSide.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ if (_initiator) then {
_args params ["_trench", "_digTime"];

private _diggingPlayers = _trench getVariable [QGVAR(diggingPlayers), []];
{
if (isNull _x) then {
_diggingPlayers deleteAt _forEachIndex;
};
}forEach _diggingPlayers;
_diggingPlayers = _diggingPlayers - [objNull];

if !(_diggingPlayers isEqualTo (_trench getVariable [QGVAR(diggingPlayers), []])) then {
_trench setVariable [QGVAR(diggingPlayers), _diggingPlayers, true];
Expand Down

0 comments on commit dfdd3e1

Please sign in to comment.