mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Uploading new files for load functions
The files are heavily edited.
This commit is contained in:
@@ -1,31 +1,23 @@
|
|||||||
// Load_act.sqf
|
// Load_act.sqf
|
||||||
// JULY 2010 - norrin
|
// JULY 2010 - norrin
|
||||||
|
// Updated December 2019 - JasonTM
|
||||||
|
|
||||||
private ["_args","_dragger","_vcl","_wounded"];
|
private ["_args","_medic","_vcl","_wounded"];
|
||||||
|
|
||||||
_args = _this select 3;
|
_args = _this select 3;
|
||||||
_dragger = _args select 0;
|
_medic = _args select 0;
|
||||||
_vcl = _args select 1;
|
_vcl = _args select 1;
|
||||||
_wounded = _args select 2;
|
_wounded = _args select 2;
|
||||||
r_drag_sqf = false;
|
|
||||||
r_action = false;
|
r_action = false;
|
||||||
r_action_load = false;
|
|
||||||
call fnc_usec_medic_removeActions;
|
call fnc_usec_medic_removeActions;
|
||||||
|
|
||||||
_wounded removeAction NORRN_loadWoundedAction;
|
if ((_vcl emptyPositions "cargo") > 0) then {
|
||||||
|
|
||||||
if ((_vcl emptyPositions "cargo") > 0) then
|
// Send information to start the load process
|
||||||
{
|
PVDZ_send = [_wounded,"LoadWounded",[_wounded,_medic,_vcl],[_wounded,dayz_authKey,_medic]];
|
||||||
detach _wounded;
|
publicVariableServer "PVDZ_send";
|
||||||
_dragger switchMove "";
|
|
||||||
_wounded setVariable ["NORRN_LoadVcl", _vcl, true];
|
|
||||||
uiSleep 1;
|
|
||||||
//["PVDZ_drg_RLact",_wounded] call broadcastRpcCallAll;
|
|
||||||
[_wounded] execVM "\z\addons\dayz_code\medical\load\load_wounded.sqf";
|
|
||||||
PVDZ_drg_RLact = _wounded;
|
|
||||||
publicVariable "PVDZ_drg_RLact";
|
|
||||||
player removeAction NORRN_dropAction;
|
|
||||||
} else {
|
} else {
|
||||||
localize "str_dragnospace" call dayz_rollingMessages;//hint "No space left in vehicle";
|
localize "str_dragnospace" call dayz_rollingMessages; // "No space left in vehicle"
|
||||||
};
|
};
|
||||||
NORRN_load_wounded_action = true;
|
|
||||||
|
|||||||
@@ -1,52 +1,40 @@
|
|||||||
// Load_wounded.sqf
|
// Load_wounded.sqf
|
||||||
// OCTOBER 2010 - norrin
|
// OCTOBER 2010 - norrin
|
||||||
|
// Updated December 2019 - JasonTM
|
||||||
|
|
||||||
private ["_wounded","_vcl","_group"];
|
private ["_wounded","_vehicle","_group","_medic"];
|
||||||
|
|
||||||
_wounded = _this select 0;
|
_wounded = _this select 0;
|
||||||
|
_medic = _this select 1;
|
||||||
|
_vehicle = _this select 2;
|
||||||
|
|
||||||
if (!local _wounded) exitWith {};
|
// Check to see that the first passed object matches local player object
|
||||||
|
if (player != _wounded) exitWith {};
|
||||||
|
if !(r_player_unconscious) exitWith {};
|
||||||
|
|
||||||
uiSleep 1;
|
_wounded assignAsCargo _vehicle;
|
||||||
_vcl = _wounded getVariable "NORRN_loadVcl";
|
_wounded moveInCargo _vehicle;
|
||||||
_wounded setVariable ["NORRN_unit_dragged", true, true];
|
|
||||||
|
|
||||||
_wounded assignAsCargo _vcl;
|
// Animation needs to be synced on all clients.
|
||||||
_wounded moveInCargo _vcl;
|
[nil, _wounded, rSWITCHMOVE, "KIA_HMMWV_Cargo01"] call RE;
|
||||||
uiSleep 1;
|
_wounded switchMove "KIA_HMMWV_Cargo01";
|
||||||
//["PVDZ_drg_RaLW",_wounded] call broadcastRpcCallAll;
|
|
||||||
PVDZ_drg_RaLW = _wounded;
|
|
||||||
publicVariable "PVDZ_drg_RaLW";
|
|
||||||
_wounded switchMove "kia_hmmwv_driver";
|
|
||||||
|
|
||||||
if (local _wounded) then
|
r_drag_sqf = true;
|
||||||
{
|
|
||||||
waitUntil {!(_wounded getVariable "NORRN_unconscious")|| !alive _wounded || vehicle _wounded == _wounded || (assignedVehicleRole _wounded) select 0 != "Cargo"};
|
|
||||||
|
|
||||||
if ((vehicle _wounded == _wounded) || (assignedVehicleRole _wounded) select 0 != "Cargo") exitWith
|
while {r_drag_sqf} do {
|
||||||
{
|
|
||||||
if (_wounded getVariable "NORRN_AIunconscious") then
|
// If the player wakes up, end the loop.
|
||||||
{
|
if (!(_wounded getVariable ["NORRN_unconscious", false])) then {
|
||||||
if (vehicle _wounded != _wounded) then
|
|
||||||
{
|
uiSleep 2; // Give fn_unconsious time to finish
|
||||||
unassignVehicle _wounded;
|
|
||||||
uiSleep 0.05;
|
if (vehicle _wounded != _wounded) then {
|
||||||
_wounded action ["EJECT", _vcl];
|
// fn_unconscious does not perform an animation if the player is in a vehicle.
|
||||||
uiSleep 1;
|
[nil, _wounded, rSWITCHMOVE, "HMMWV_Cargo01"] call RE;
|
||||||
};
|
_wounded switchMove "HMMWV_Cargo01";
|
||||||
// PVDZ_drg_RAlie = _wounded; // not used
|
|
||||||
// publicVariable "PVDZ_drg_RAlie"; // not used
|
|
||||||
_wounded switchMove "ainjppnemstpsnonwrfldnon";
|
|
||||||
_wounded setVariable ["NORRN_unit_dragged", false, true];
|
|
||||||
uiSleep 1;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
r_drag_sqf = false;
|
||||||
};
|
};
|
||||||
|
uiSleep 1;
|
||||||
if (vehicle _wounded != _wounded && alive _wounded) then
|
};
|
||||||
{
|
|
||||||
_wounded playMove "BasicDriver";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
uiSleep 0.01;
|
|
||||||
|
|
||||||
if (true) exitWith {};
|
|
||||||
@@ -1,40 +1,30 @@
|
|||||||
// unLoad_act.sqf
|
// unLoad_act.sqf
|
||||||
// AUGUST 2010 - norrin
|
// AUGUST 2010 - norrin
|
||||||
|
// Updated December 2019 - JasonTM
|
||||||
|
|
||||||
private ["_args","_dragger","_vcl","_wounded"];
|
private ["_args","_unconscious_crew","_vehicle","_pos","_wounded","_medic"];
|
||||||
|
|
||||||
_args = _this select 3;
|
_args = _this select 3;
|
||||||
_name = _args select 0;
|
_medic = _args select 0;
|
||||||
_vcl = _args select 1;
|
_unconscious_crew = _args select 1;
|
||||||
_crewVcl = crew _vcl;
|
_vehicle = _args select 2;
|
||||||
LHA_Deck = [];
|
_pos = [_vehicle] call FNC_GetPos;
|
||||||
LHA_height = 0;
|
|
||||||
|
|
||||||
//_name removeAction NORRN_pullOutAction; // NORRN_pullOutAction is defined anywhere
|
r_action = false;
|
||||||
|
call fnc_usec_medic_removeActions;
|
||||||
|
|
||||||
for [{ _loop = 0 },{ _loop < count _crewVcl },{ _loop = _loop + 1}] do
|
// Prevent trolling unconscious players by checking that the position is not over water.
|
||||||
{
|
if !(surfaceIsWater _pos) then {
|
||||||
_unit = _crewVcl select _loop;
|
|
||||||
|
|
||||||
if (_unit getVariable "NORRN_unconscious") then
|
|
||||||
{
|
{
|
||||||
unassignVehicle _unit;
|
_wounded = _x;
|
||||||
uiSleep 0.05;
|
unassignVehicle _wounded;
|
||||||
_unit action ["EJECT", _vcl];
|
_wounded action ["EJECT", _vehicle];
|
||||||
uiSleep 1;
|
|
||||||
_position = getPosATL _unit;
|
// Send information to reestablish the "lie on back" animation
|
||||||
_isOnDeck = getPosASL _unit in LHA_Deck;
|
PVDZ_send = [_wounded,"UnloadWounded",_wounded,[_pos,dayz_authKey,_medic]];
|
||||||
if (_isOnDeck) then {
|
publicVariableServer "PVDZ_send";
|
||||||
_unit setPosAsl [(_position select 0), (_position select 1), (LHA_height+1)];
|
|
||||||
};
|
|
||||||
_unit switchMove "";
|
|
||||||
_unit switchMove "ainjppnemstpsnonwrfldnon";
|
|
||||||
uiSleep 0.2;
|
|
||||||
//Needed or else patient user input is not fully disabled after eject
|
|
||||||
PVDZ_drg_RaDrag = [_unit];
|
|
||||||
publicVariable "PVDZ_drg_RaDrag";
|
|
||||||
};
|
|
||||||
uiSleep 0.1;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (true) exitWith {};
|
} count _unconscious_crew;
|
||||||
|
} else {
|
||||||
|
localize "str_actions_unload_fail" call dayz_rollingMessages;
|
||||||
|
};
|
||||||
|
|||||||
18
SQF/dayz_code/medical/load/unload_wounded.sqf
Normal file
18
SQF/dayz_code/medical/load/unload_wounded.sqf
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// unload_wounded.sqf
|
||||||
|
// December 2019 - JasonTM
|
||||||
|
|
||||||
|
private "_wounded";
|
||||||
|
|
||||||
|
_wounded = _this;
|
||||||
|
|
||||||
|
// Check to see that the passed object matches local player object
|
||||||
|
if (player != _wounded) exitWith {};
|
||||||
|
|
||||||
|
// Check if the player is still unconscious
|
||||||
|
if (r_player_unconscious) then {
|
||||||
|
// Reestablish the "lie on back" animation
|
||||||
|
[nil, _wounded, rSWITCHMOVE, "ainjppnemstpsnonwrfldnon"] call RE;
|
||||||
|
_wounded switchmove "ainjppnemstpsnonwrfldnon";
|
||||||
|
};
|
||||||
|
|
||||||
|
r_drag_sqf = false;
|
||||||
Reference in New Issue
Block a user