This commit is contained in:
icomrade
2016-05-13 17:40:34 -04:00
parent c118ecbb15
commit d442592e55
2 changed files with 5 additions and 2 deletions

View File

@@ -57,6 +57,9 @@ if (!_fueling) then {
r_doLoop = false; r_doLoop = false;
if (_finished) then { if (_finished) then {
if((_vehicle isKindOf "Generator_DZ") && {!(_vehicle getVariable ["GeneratorFilled", false])}) then {
_vehicle setVariable ["GeneratorFilled", true, true];
};
if (local _vehicle) then { if (local _vehicle) then {
[_vehicle,_newFuel] call local_setFuel; [_vehicle,_newFuel] call local_setFuel;
} else { } else {

View File

@@ -835,10 +835,10 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
// check if Generator_DZ is running within 30 meters // check if Generator_DZ is running within 30 meters
_findNearestGen = []; _findNearestGen = [];
{ {
if (alive _x && (_x getVariable ["GeneratorRunning", false])) then { if ((alive _x) && (_x getVariable ["GeneratorRunning", false])) then {
_findNearestGen set [count _findNearestGen,_x]; _findNearestGen set [count _findNearestGen,_x];
}; };
} count ([player] call FNC_getPos) nearEntities ["Generator_DZ", 30]; } count (nearestObjects [([player] call FNC_getPos), ["Generator_DZ"], 30]);
// show that pump needs power if no generator nearby. // show that pump needs power if no generator nearby.
if ((count _findNearestGen) > 0) then { if ((count _findNearestGen) > 0) then {