mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-17 09:10:27 +03:00
Fix infinite refueling with the fuel pump
This commit is contained in:
@@ -716,7 +716,7 @@ if (!isNull _cursorTarget && _noChange && !_inVehicle && !_isPZombie && _canDo &
|
||||
if (s_player_fuelauto < 0) then {
|
||||
local _findNearestGen = {((alive _x) && (_x getVariable ["GeneratorRunning",false]))} count (([player] call FNC_getPos) nearObjects ["Generator_DZ",30]);
|
||||
if (_findNearestGen > 0) then {
|
||||
s_player_fuelauto = player addAction [localize "STR_EPOCH_ACTIONS_FILLVEH", "\z\addons\dayz_code\actions\fill_nearestVehicle.sqf",objNull, 0, false, true];
|
||||
s_player_fuelauto = player addAction [localize "STR_EPOCH_ACTIONS_FILLVEH", "\z\addons\dayz_code\actions\fill_nearestVehicle.sqf",[1,_cursorTarget], 0, false, true];
|
||||
} else {
|
||||
s_player_fuelauto = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_NEEDPOWER"], "",[], 0, false, true];
|
||||
};
|
||||
@@ -730,7 +730,7 @@ if (!isNull _cursorTarget && _noChange && !_inVehicle && !_isPZombie && _canDo &
|
||||
if (_isAlive && {_typeOfCursorTarget in DZE_fueltruckarray}) then {
|
||||
if (s_player_fuelauto2 < 0) then {
|
||||
if (isEngineOn _cursorTarget) then {
|
||||
s_player_fuelauto2 = player addAction [localize "STR_EPOCH_ACTIONS_FILLVEH", "\z\addons\dayz_code\actions\fill_nearestVehicle.sqf",_cursorTarget, 0, false, true];
|
||||
s_player_fuelauto2 = player addAction [localize "STR_EPOCH_ACTIONS_FILLVEH", "\z\addons\dayz_code\actions\fill_nearestVehicle.sqf",[2,_cursorTarget ], 0, false, true];
|
||||
} else {
|
||||
s_player_fuelauto2 = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_NEEDPOWER"], "",[], 0, false, true];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user