Skip to content

Commit

Permalink
disable sim for locked veh
Browse files Browse the repository at this point in the history
  • Loading branch information
tbox1911 committed May 13, 2024
1 parent e4ee7e0 commit bcecb1c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ GRLIB_checkAction_SendArsenal = {

GRLIB_checkAction_Pickup_Weapons = {
params ["_target", "_unit"];
(GRLIB_player_is_menuok && alive _target && load _target < 0.8)
(GRLIB_player_is_menuok && alive _target && load _target < 0.8 && !(_target getVariable ['R3F_LOG_disabled', false]))
};

GRLIB_checkAction_UnpackInventory = {
Expand Down
1 change: 1 addition & 0 deletions core.liberation/scripts/server/game/load_game_mp.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ if ( !isNil "_lrx_liberation_savegame" ) then {

if ( _nextclass in GRLIB_vehicles_light ) then {
_nextbuilding setVariable ["R3F_LOG_disabled", false, true];
_nextbuilding enableSimulationGlobal true;
if ( _nextclass in list_static_weapons ) then {
_nextbuilding setVehicleLock "DEFAULT";
{ _nextbuilding lockTurret [_x, false] } forEach (allTurrets _nextbuilding);
Expand Down
4 changes: 2 additions & 2 deletions core.liberation/scripts/shared/functions/F_check_near.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ if (typeName (_classlist select 0) == "STRING") then {
_near = _obj_list select {
alive _x && getObjectType _x >= 8 &&
(
isNull (_x getVariable ["R3F_LOG_est_transporte_par", objNull]) ||
!(_x getVariable ['R3F_LOG_disabled', true])
!(_x getVariable ['R3F_LOG_disabled', false]) ||
!(isNull (attachedTo _x))
)
};
};
Expand Down
5 changes: 5 additions & 0 deletions core.liberation/scripts/shared/functions/F_vehicleLock.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ switch (_cmd) do {
_vehicle setVariable ["GRLIB_counter_TTL", nil, true];
_vehicle setVariable ["GRLIB_last_killer", nil, true];
_vehicle engineOn false;
_vehicle enableSimulationGlobal false;
};
case "unlock" : {
_vehicle lockCargo false;
Expand All @@ -21,6 +22,8 @@ switch (_cmd) do {
{ _vehicle lockTurret [_x, false] } forEach (allTurrets _vehicle);
_vehicle setVehicleLock "UNLOCKED";
_vehicle setVariable ["R3F_LOG_disabled", false, true];
_vehicle enableSimulationGlobal true;
{_x reveal _vehicle} forEach (units GRLIB_side_friendly);
};
case "abandon" : {
_vehicle lockCargo false;
Expand All @@ -31,5 +34,7 @@ switch (_cmd) do {
_vehicle setVariable ["R3F_LOG_disabled", false, true];
_vehicle setVariable ["GRLIB_vehicle_owner", "", true];
[_vehicle] call RPT_fnc_ResetVehicle;
_vehicle enableSimulationGlobal true;
{_x reveal _vehicle} forEach (units GRLIB_side_friendly);
};
};

0 comments on commit bcecb1c

Please sign in to comment.