mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-26 17:51:51 +03:00
New files uploaded for the load functions
These files are heavily edited, so it is easier to just upload new copies.
This commit is contained in:
@@ -0,0 +1,23 @@
|
|||||||
|
// Load_act.sqf
|
||||||
|
// JULY 2010 - norrin
|
||||||
|
// Updated December 2019 - JasonTM
|
||||||
|
|
||||||
|
private ["_args","_medic","_vcl","_wounded"];
|
||||||
|
|
||||||
|
_args = _this select 3;
|
||||||
|
_medic = _args select 0;
|
||||||
|
_vcl = _args select 1;
|
||||||
|
_wounded = _args select 2;
|
||||||
|
|
||||||
|
r_action = false;
|
||||||
|
call fnc_usec_medic_removeActions;
|
||||||
|
|
||||||
|
if ((_vcl emptyPositions "cargo") > 0) then {
|
||||||
|
|
||||||
|
// Send information to start the load process
|
||||||
|
PVDZ_send = [_wounded,"LoadWounded",[_wounded,_medic,_vcl],[_wounded,dayz_authKey,_medic]];
|
||||||
|
publicVariableServer "PVDZ_send";
|
||||||
|
} else {
|
||||||
|
localize "str_dragnospace" call dayz_rollingMessages; // "No space left in vehicle"
|
||||||
|
};
|
||||||
|
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
// Load_wounded.sqf
|
||||||
|
// OCTOBER 2010 - norrin
|
||||||
|
// Updated December 2019 - JasonTM
|
||||||
|
|
||||||
|
private ["_wounded","_vehicle","_group","_medic"];
|
||||||
|
|
||||||
|
_wounded = _this select 0;
|
||||||
|
_medic = _this select 1;
|
||||||
|
_vehicle = _this select 2;
|
||||||
|
|
||||||
|
// Check to see that the first passed object matches local player object
|
||||||
|
if (player != _wounded) exitWith {};
|
||||||
|
if !(r_player_unconscious) exitWith {};
|
||||||
|
|
||||||
|
_wounded assignAsCargo _vehicle;
|
||||||
|
_wounded moveInCargo _vehicle;
|
||||||
|
|
||||||
|
// Animation needs to be synced on all clients.
|
||||||
|
[nil, _wounded, rSWITCHMOVE, "KIA_HMMWV_Cargo01"] call RE;
|
||||||
|
_wounded switchMove "KIA_HMMWV_Cargo01";
|
||||||
|
|
||||||
|
r_drag_sqf = true;
|
||||||
|
|
||||||
|
while {r_drag_sqf} do {
|
||||||
|
|
||||||
|
// If the player wakes up, end the loop.
|
||||||
|
if (!(_wounded getVariable ["NORRN_unconscious", false])) then {
|
||||||
|
|
||||||
|
uiSleep 2; // Give fn_unconsious time to finish
|
||||||
|
|
||||||
|
if (vehicle _wounded != _wounded) then {
|
||||||
|
// fn_unconscious does not perform an animation if the player is in a vehicle.
|
||||||
|
[nil, _wounded, rSWITCHMOVE, "HMMWV_Cargo01"] call RE;
|
||||||
|
_wounded switchMove "HMMWV_Cargo01";
|
||||||
|
};
|
||||||
|
|
||||||
|
r_drag_sqf = false;
|
||||||
|
};
|
||||||
|
uiSleep 1;
|
||||||
|
};
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
// unLoad_act.sqf
|
||||||
|
// AUGUST 2010 - norrin
|
||||||
|
// Updated December 2019 - JasonTM
|
||||||
|
|
||||||
|
private ["_args","_unconscious_crew","_vehicle","_pos","_wounded","_medic"];
|
||||||
|
|
||||||
|
_args = _this select 3;
|
||||||
|
_medic = _args select 0;
|
||||||
|
_unconscious_crew = _args select 1;
|
||||||
|
_vehicle = _args select 2;
|
||||||
|
_pos = [_vehicle] call FNC_GetPos;
|
||||||
|
|
||||||
|
r_action = false;
|
||||||
|
call fnc_usec_medic_removeActions;
|
||||||
|
|
||||||
|
// Prevent trolling unconscious players by checking that the position is not over water.
|
||||||
|
if !(surfaceIsWater _pos) then {
|
||||||
|
{
|
||||||
|
_wounded = _x;
|
||||||
|
unassignVehicle _wounded;
|
||||||
|
_wounded action ["EJECT", _vehicle];
|
||||||
|
|
||||||
|
// Send information to reestablish the "lie on back" animation
|
||||||
|
PVDZ_send = [_wounded,"UnloadWounded",_wounded,[_pos,dayz_authKey,_medic]];
|
||||||
|
publicVariableServer "PVDZ_send";
|
||||||
|
|
||||||
|
} count _unconscious_crew;
|
||||||
|
} else {
|
||||||
|
localize "str_actions_unload_fail" call dayz_rollingMessages;
|
||||||
|
};
|
||||||
@@ -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