mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Last Clothing Check
This commit is contained in:
parent
b26b22c1f6
commit
a038ec6c34
@ -13,7 +13,7 @@
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_player/EPOCH_server_SetUnitLoadout.sqf
|
||||
*/
|
||||
//[[[cog import generate_private_arrays ]]]
|
||||
private ["_type"];
|
||||
private ["_type","_loadabs"];
|
||||
//[[[end]]]
|
||||
|
||||
params ["_newPlyr","_loadout"];
|
||||
@ -83,6 +83,11 @@ if !(_bpack isequalto "") then {
|
||||
[Vestcontainer _newPlyr, _vestitems],
|
||||
[BackpackContainer _newPlyr, _bpackitems]
|
||||
];
|
||||
|
||||
|
||||
true
|
||||
_loadabs = loadabs _newPlyr;
|
||||
if !(uniform _newPlyr isequalto _uniform && vest _newPlyr isequalto _vest && backpack _newPlyr isequalto _bpack) then {
|
||||
diag_log format ["EPOCH Debug: Setunitloadout failed - Unifmorm should: %1 is: %2 - Vest should: %3 is: %4 - Backpack should: %5 is: %6",_uniform,uniform _newPlyr,_vest,vest _newPlyr,_bpack,backpack _newPlyr];
|
||||
_loadabs = -1;
|
||||
};
|
||||
|
||||
_loadabs
|
||||
|
@ -206,8 +206,10 @@ if (!isNull _player) then {
|
||||
// _newPlyr setUnitLoadout [_loadout, false];
|
||||
|
||||
// Workaround for Client / Server synchronizing issue in SetUnitLoadout
|
||||
[_newPlyr,_loadout] call Epoch_server_SetUnitLoadout;
|
||||
_loadabs = loadabs _newPlyr;
|
||||
_loadabs = [_newPlyr,_loadout] call Epoch_server_SetUnitLoadout;
|
||||
if (_loadabs isequalto -1) then {
|
||||
deleteVehicle _newPlyr;
|
||||
};
|
||||
|
||||
// Final Push
|
||||
if (isNull _player) then {
|
||||
|
@ -13,7 +13,7 @@
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_player/EPOCH_server_revivePlayer.sqf
|
||||
*/
|
||||
//[[[cog import generate_private_arrays ]]]
|
||||
private ["_loadout","_CorpseCrypto","_PlayerCrypto","_attachments","_cIndex","_class","_currwh","_deleteprimary","_deletesecondary","_dir","_droppedPrimary","_droppedSecondary","_droppedWeapons","_equipped","_group","_garbage","_location","_newPlyr","_playerGroup","_playerUID","_token","_type","_vars","_wMags","_wMagsArray","_weapon","_wh","_kIndex","_reviver","_reviverCStats","_reviverKarma","_reviverKarmaAdj"];
|
||||
private ["_loadabs","_loadout","_CorpseCrypto","_PlayerCrypto","_attachments","_cIndex","_class","_currwh","_deleteprimary","_deletesecondary","_dir","_droppedPrimary","_droppedSecondary","_droppedWeapons","_equipped","_group","_garbage","_location","_newPlyr","_playerGroup","_playerUID","_token","_type","_vars","_wMags","_wMagsArray","_weapon","_wh","_kIndex","_reviver","_reviverCStats","_reviverKarma","_reviverKarmaAdj"];
|
||||
//[[[end]]]
|
||||
params ["_player","_reviver",["_token","",[""]] ];
|
||||
|
||||
@ -98,10 +98,7 @@ if (!local _player) then {
|
||||
_group = createGroup [west, true];
|
||||
diag_log format["DEBUG Group Created: %1", _group];
|
||||
};
|
||||
|
||||
_garbage = createVehicle [selectrandom ["MedicalGarbage_01_1x1_v1_F","MedicalGarbage_01_1x1_v3_F","MedicalGarbage_01_1x1_v2_F"], _location, [], 0, "CAN_COLLIDE"];
|
||||
EPOCH_cleanupQueue pushBack _garbage;
|
||||
|
||||
|
||||
_newPlyr = _group createUnit[_class, _location, [], 0, "CAN_COLLIDE"];
|
||||
|
||||
// new Dynamicsimulation
|
||||
@ -136,7 +133,16 @@ if (!local _player) then {
|
||||
// _newPlyr setUnitLoadout [_loadout, false];
|
||||
|
||||
// Workaround for Client / Server synchronizing issue in SetUnitLoadout
|
||||
[_newPlyr,_loadout] call Epoch_server_SetUnitLoadout;
|
||||
_loadabs = [_newPlyr,_loadout] call Epoch_server_SetUnitLoadout;
|
||||
if (_loadabs isequalto -1) exitwith {
|
||||
removeFromRemainsCollector [_newPlyr];
|
||||
deletevehicle _newPlyr;
|
||||
_player setvariable ['Reviving',false];
|
||||
_player hideObjectGlobal false;
|
||||
};
|
||||
|
||||
_garbage = createVehicle [selectrandom ["MedicalGarbage_01_1x1_v1_F","MedicalGarbage_01_1x1_v3_F","MedicalGarbage_01_1x1_v2_F"], _location, [], 0, "CAN_COLLIDE"];
|
||||
EPOCH_cleanupQueue pushBack _garbage;
|
||||
|
||||
// Final Push
|
||||
_token = _newPlyr call EPOCH_server_setPToken;
|
||||
@ -152,7 +158,7 @@ if (!local _player) then {
|
||||
};
|
||||
|
||||
// send to player
|
||||
[_newPlyr, _token, loadAbs _newPlyr] remoteExec ['EPOCH_clientRevive',_player];
|
||||
[_newPlyr, _token, _loadabs] remoteExec ['EPOCH_clientRevive',_player];
|
||||
|
||||
// send stat to reviver
|
||||
[_reviver, "Revives", 1, true] call EPOCH_server_updatePlayerStats;
|
||||
|
Loading…
x
Reference in New Issue
Block a user