mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Fix #1691
This commit is contained in:
@@ -57,6 +57,9 @@ if (!_fueling) then {
|
||||
r_doLoop = false;
|
||||
|
||||
if (_finished) then {
|
||||
if((_vehicle isKindOf "Generator_DZ") && {!(_vehicle getVariable ["GeneratorFilled", false])}) then {
|
||||
_vehicle setVariable ["GeneratorFilled", true, true];
|
||||
};
|
||||
if (local _vehicle) then {
|
||||
[_vehicle,_newFuel] call local_setFuel;
|
||||
} else {
|
||||
|
||||
@@ -835,10 +835,10 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
|
||||
// check if Generator_DZ is running within 30 meters
|
||||
_findNearestGen = [];
|
||||
{
|
||||
if (alive _x && (_x getVariable ["GeneratorRunning", false])) then {
|
||||
if ((alive _x) && (_x getVariable ["GeneratorRunning", false])) then {
|
||||
_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.
|
||||
if ((count _findNearestGen) > 0) then {
|
||||
|
||||
Reference in New Issue
Block a user