mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Finish Medical and Sleep to UiSleep
This commit is contained in:
@@ -38,7 +38,7 @@ if (_hasbottleitem and _hastinitem) then {
|
||||
_qty = _qty + ({_x == "ItemWaterBottleSafe"} count magazines player);
|
||||
|
||||
player playActionNow "Medic";
|
||||
sleep 1;
|
||||
uiSleep 1;
|
||||
_dis=10;
|
||||
_sfx = "cook";
|
||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
||||
|
||||
@@ -8,7 +8,7 @@ _vehicle setVariable ["hasBomb",true,true];
|
||||
|
||||
_vehicle addEventHandler ["GetIn",{
|
||||
//diag_log str(_this);
|
||||
sleep 2;
|
||||
uiSleep 2;
|
||||
_bombCar = _this select 0;
|
||||
_bomb = createVehicle ["Bo_GBU12_lgb",getPosATL _bombCar, [], 0, "NONE"];
|
||||
}];
|
||||
@@ -1,7 +1,7 @@
|
||||
private["_obj"];
|
||||
_obj = _this select 3;
|
||||
player playActionNow "Medic";
|
||||
sleep 6;
|
||||
uiSleep 6;
|
||||
if(_obj isKindOf "Land_fire") then {
|
||||
dayz_hasFire = objNull;
|
||||
deleteVehicle _obj;
|
||||
|
||||
@@ -35,7 +35,7 @@ if (_build) then {
|
||||
[player,_dis,true,(getPosATL player)] call player_alertZombies;
|
||||
["Working",0,[20,40,15,0]] call dayz_NutritionSystem; // Added Nutrition-Factor for work
|
||||
player playActionNow "Medic";
|
||||
sleep 5;
|
||||
uiSleep 5;
|
||||
|
||||
_object setPosATL _location;
|
||||
player reveal _object;
|
||||
|
||||
@@ -120,7 +120,7 @@ for "_i" from 1 to 20 do {
|
||||
_cursorTarget setPosATL _pos;
|
||||
};
|
||||
|
||||
sleep 1.5;
|
||||
uiSleep 1.5;
|
||||
|
||||
if (r_interrupt) exitwith {
|
||||
diag_log [diag_ticktime, __FILE__, "Operation interrupted, last building deleted is:", _upgrade];
|
||||
|
||||
@@ -104,7 +104,7 @@ while {_isOk} do {
|
||||
r_doLoop = false;
|
||||
_finished = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
uiSleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
@@ -144,7 +144,7 @@ while {_isOk} do {
|
||||
};
|
||||
|
||||
titleText [format["Dismantle attempt (%1 of %2).", _counter,_limit], "PLAIN DOWN"];
|
||||
sleep 0.10;
|
||||
uiSleep 0.10;
|
||||
};
|
||||
|
||||
//Completed and successful
|
||||
|
||||
@@ -91,7 +91,7 @@ if (_startMaintenance) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
sleep 0.1;
|
||||
uiSleep 0.1;
|
||||
};
|
||||
|
||||
r_doLoop = false;
|
||||
|
||||
@@ -48,7 +48,7 @@ if(_classname == "WoodenArrow") then {
|
||||
|
||||
if (_broken) exitWith {DZE_CanPickup = true; deleteVehicle _holder; cutText [localize "str_broken_arrow", "PLAIN DOWN"]; };
|
||||
|
||||
sleep 0.25; //Why are we waiting? Animation
|
||||
uiSleep 0.25; //Why are we waiting? Animation
|
||||
|
||||
_claimedBy = _holder getVariable["claimed","0"];
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ if ((_startUpgrade) AND (isClass(_upgradeConfig))) then {
|
||||
|
||||
_cursorTarget setVariable["alreadyupgrading",1];
|
||||
|
||||
sleep 0.03;
|
||||
uiSleep 0.03;
|
||||
|
||||
//Get location and direction of old item
|
||||
_dir = round getDir _cursorTarget;
|
||||
@@ -201,7 +201,7 @@ if ((_startUpgrade) AND (isClass(_upgradeConfig))) then {
|
||||
_countr = _countr + 1;
|
||||
} count _objWpnTypes;
|
||||
|
||||
sleep 3;
|
||||
uiSleep 3;
|
||||
|
||||
//Light fire
|
||||
[_object,true] call dayz_inflame;
|
||||
|
||||
@@ -145,7 +145,7 @@ if ((_startUpgrade) AND (isClass(_upgradeConfig))) then {
|
||||
|
||||
_cursorTarget setVariable["alreadyupgrading",1];
|
||||
|
||||
sleep 0.03;
|
||||
uiSleep 0.03;
|
||||
|
||||
//Get location and direction of old item
|
||||
_dir = round getDir _cursorTarget;
|
||||
@@ -225,7 +225,7 @@ if ((_startUpgrade) AND (isClass(_upgradeConfig))) then {
|
||||
_countr = _countr + 1;
|
||||
} count _objWpnTypes;
|
||||
|
||||
sleep 3;
|
||||
uiSleep 3;
|
||||
|
||||
//publish new tent
|
||||
PVDZE_obj_Publish = [dayz_characterID,_object,[_dir, _pos],[_weapons,_magazines,_backpacks]];
|
||||
|
||||
@@ -66,7 +66,7 @@ if (_hasInput) then {
|
||||
} forEach _input;
|
||||
|
||||
_availabeSpace = true;
|
||||
//sleep 1;
|
||||
//uiSleep 1;
|
||||
|
||||
if (_availabeSpace) then {
|
||||
player playActionNow "PutDown";
|
||||
|
||||
@@ -21,7 +21,7 @@ player removeMagazine "ItemCarBomb";
|
||||
|
||||
//wait a bit
|
||||
player playActionNow "Medic";
|
||||
sleep 1;
|
||||
uiSleep 1;
|
||||
|
||||
//DO Animation
|
||||
_dis=20;
|
||||
|
||||
@@ -10,12 +10,12 @@ _hasCrowbar = "ItemCrowbar" in items player;
|
||||
|
||||
if (!_hasSledgeHammer) exitWith {
|
||||
titleText ["You need a SledgeHammer to break into this compound" , "PLAIN DOWN"];
|
||||
sleep 1;
|
||||
uiSleep 1;
|
||||
};
|
||||
|
||||
if (!_hasCrowbar) exitWith {
|
||||
titleText ["You need a crowbar to break into this compound." , "PLAIN DOWN"];
|
||||
sleep 1;
|
||||
uiSleep 1;
|
||||
};
|
||||
|
||||
_isOk = true;
|
||||
@@ -31,13 +31,13 @@ while {_isOk} do {
|
||||
if (!_hasSledgeHammer) exitWith {
|
||||
_proceed = nil;
|
||||
titleText ["You need a sledge hammer to break into a gate." , "PLAIN DOWN"];
|
||||
sleep 1;
|
||||
uiSleep 1;
|
||||
};
|
||||
|
||||
if (!_hasCrowbar) exitWith {
|
||||
_proceed = nil;
|
||||
titleText ["You need a crowbar to break into a gate." , "PLAIN DOWN"];
|
||||
sleep 1;
|
||||
uiSleep 1;
|
||||
};
|
||||
|
||||
//Run animation
|
||||
@@ -71,7 +71,7 @@ while {_isOk} do {
|
||||
r_doLoop = false;
|
||||
_finished = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
uiSleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
@@ -121,7 +121,7 @@ while {_isOk} do {
|
||||
};
|
||||
|
||||
titleText [format["Breaking into compound, attempt (%1 of %2).", _counter,_limit], "PLAIN DOWN"];
|
||||
sleep 0.03;
|
||||
uiSleep 0.03;
|
||||
};
|
||||
//Tool issues
|
||||
if (isnil "_proceed") exitwith {};
|
||||
|
||||
@@ -387,7 +387,7 @@ while {r_action_count != 0 and Dayz_constructionContext select 4} do {
|
||||
};
|
||||
};
|
||||
};
|
||||
sleep 0.03;
|
||||
uiSleep 0.03;
|
||||
};
|
||||
|
||||
if (!_actionBuildHidden) then { // player can't build until all is fine
|
||||
|
||||
@@ -92,7 +92,7 @@ if (_woodCutting) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
|
||||
sleep 0.1;
|
||||
uiSleep 0.1;
|
||||
};
|
||||
|
||||
if(!_finished) exitWith {
|
||||
@@ -134,7 +134,7 @@ if (_woodCutting) then {
|
||||
};
|
||||
_isOk = false;
|
||||
_proceed = true;
|
||||
sleep 1;
|
||||
uisleep 1;
|
||||
};
|
||||
cutText [format [localize "str_player_24_progress", _counter,_countOut], "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
@@ -82,5 +82,5 @@ switch true do {
|
||||
};
|
||||
};
|
||||
|
||||
sleep 1;
|
||||
uiSleep 1;
|
||||
r_action_count = 0;
|
||||
@@ -131,7 +131,7 @@ if (_output != "") then
|
||||
if (vehicle player == player) then
|
||||
{
|
||||
//wait a while before dropping the output item
|
||||
sleep 3;
|
||||
uiSleep 3;
|
||||
//Drop Item to ground
|
||||
_output call fn_dropItem;
|
||||
};
|
||||
|
||||
@@ -118,14 +118,14 @@ if(!r_drag_sqf and !r_player_unconscious and !_onLadder) then {
|
||||
};
|
||||
};
|
||||
} forEach _output;
|
||||
//sleep 1;
|
||||
//uiSleep 1;
|
||||
|
||||
if (_availabeSpace) then {
|
||||
//player playActionNow "PutDown";
|
||||
call gear_ui_init;
|
||||
closeDialog 1;
|
||||
player playActionNow "Medic";
|
||||
sleep 2;
|
||||
uiSleep 2;
|
||||
//setup alert and speak
|
||||
_dis=20;
|
||||
_sfx = "chopwood";
|
||||
@@ -147,10 +147,10 @@ if(!r_drag_sqf and !r_player_unconscious and !_onLadder) then {
|
||||
player removeMagazine _item;
|
||||
};
|
||||
};
|
||||
//sleep 0.1;
|
||||
//uiSleep 0.1;
|
||||
};
|
||||
} forEach _input;
|
||||
sleep 3;
|
||||
uiSleep 3;
|
||||
{
|
||||
_item = _x select 0;
|
||||
_selection = _x select 1;
|
||||
@@ -173,10 +173,10 @@ if(!r_drag_sqf and !r_player_unconscious and !_onLadder) then {
|
||||
};
|
||||
};
|
||||
cutText [format [localize "str_crafting_success",_itemName], "PLAIN DOWN"];
|
||||
//sleep 2;
|
||||
//uiSleep 2;
|
||||
} else {
|
||||
cutText [format [localize "str_crafting_failed",_itemName], "PLAIN DOWN"];
|
||||
//sleep 2;
|
||||
//uiSleep 2;
|
||||
};
|
||||
};
|
||||
} forEach _output;
|
||||
|
||||
@@ -109,7 +109,7 @@ if (count _nearByPile > 0) then {
|
||||
};
|
||||
};
|
||||
} forEach _output;
|
||||
//sleep 1;
|
||||
//uiSleep 1;
|
||||
|
||||
if (_availabeSpace) then {
|
||||
player playActionNow "PutDown";
|
||||
@@ -128,7 +128,7 @@ if (count _nearByPile > 0) then {
|
||||
player removeMagazine _item;
|
||||
};
|
||||
};
|
||||
//sleep 0.1;
|
||||
//uiSleep 0.1;
|
||||
};
|
||||
} forEach _input;
|
||||
|
||||
@@ -154,10 +154,10 @@ if (count _nearByPile > 0) then {
|
||||
};
|
||||
};
|
||||
cutText [format [localize "str_crafting_success",_itemName], "PLAIN DOWN"];
|
||||
//sleep 2;
|
||||
//uiSleep 2;
|
||||
} else {
|
||||
cutText [format [localize "str_crafting_failed",_itemName], "PLAIN DOWN"];
|
||||
//sleep 2;
|
||||
//uiSleep 2;
|
||||
};
|
||||
};
|
||||
} forEach _output;
|
||||
|
||||
@@ -46,14 +46,14 @@ if ((count _worldspace) == 2) then {
|
||||
|
||||
//wait a bit
|
||||
player playActionNow "Medic";
|
||||
sleep 1;
|
||||
uiSleep 1;
|
||||
|
||||
_dis=20;
|
||||
_sfx = "tentunpack";
|
||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
||||
[player,_dis,true,(getPosATL player)] call player_alertZombies;
|
||||
|
||||
sleep 5;
|
||||
uiSleep 5;
|
||||
//place tent (local)
|
||||
_stash = createVehicle [_stashtype, _location, [], 0, "CAN_COLLIDE"];
|
||||
_stash setdir _dir;
|
||||
|
||||
@@ -11,7 +11,7 @@ if (_tape in magazines player) then {
|
||||
//Fix the bottle
|
||||
player playActionNow "Medic";
|
||||
[player,"bandage",0,false] call dayz_zombieSpeak;
|
||||
sleep 6;
|
||||
uiSleep 6;
|
||||
player removeMagazine _bottle;
|
||||
player removeMagazine _tape;
|
||||
player addMagazine _fixedBottle;
|
||||
|
||||
@@ -20,7 +20,7 @@ if ((_tape in magazines player) && (_handle in magazines player)) then {
|
||||
//Fix the tool
|
||||
player playActionNow "Medic";
|
||||
[player,"bandage",0,false] call dayz_zombieSpeak;
|
||||
sleep 6;
|
||||
uiSleep 6;
|
||||
player removeWeapon _tool;
|
||||
player removeMagazine _tape;
|
||||
player removeMagazine _handle;
|
||||
|
||||
@@ -89,7 +89,7 @@ while {_isOk} do {
|
||||
//make sure the player isnt swimming
|
||||
|
||||
// wait for animation
|
||||
sleep 2;
|
||||
uiSleep 2;
|
||||
|
||||
// check if player is in boat
|
||||
_vehicle = vehicle player;
|
||||
@@ -151,7 +151,7 @@ while {_isOk} do {
|
||||
|
||||
if(_counter == 12) then {
|
||||
_isOk = false;
|
||||
sleep 1;
|
||||
uisleep 1;
|
||||
cutText [localize "str_fishing_failed", "PLAIN DOWN"];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ if ((count _worldspace) == 2) then {
|
||||
_location = _worldspace select 1;
|
||||
|
||||
player playActionNow "Medic";
|
||||
sleep 1;
|
||||
uiSleep 1;
|
||||
// fireplace location may not be in front of player (but in 99% time it should)
|
||||
player setDir _dir;
|
||||
player setPosATL (getPosATL player);
|
||||
@@ -46,7 +46,7 @@ if ((count _worldspace) == 2) then {
|
||||
// Added Nutrition-Factor for work
|
||||
["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
|
||||
|
||||
sleep 5;
|
||||
uiSleep 5;
|
||||
|
||||
_fire = createVehicle ["Land_Fire_DZ", getMarkerpos "respawn_west", [], 0, "CAN_COLLIDE"];
|
||||
_fire setDir _dir;
|
||||
|
||||
@@ -78,7 +78,7 @@ if (!isNull _findNearestRock) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
|
||||
sleep 0.1;
|
||||
uiSleep 0.1;
|
||||
};
|
||||
|
||||
if(!_finished) exitWith {
|
||||
@@ -121,7 +121,7 @@ if (!isNull _findNearestRock) then {
|
||||
};
|
||||
_isOk = false;
|
||||
_proceed = true;
|
||||
sleep 1;
|
||||
uisleep 1;
|
||||
};
|
||||
cutText [format[localize "str_mining_progress", _counter,(_countOut - _counter)], "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
@@ -116,5 +116,5 @@ for "_i" from 1 to _qtynew_create_mags_full do {
|
||||
if (_qtynew_create_ammo_rest != 0) then {
|
||||
player addMagazine [_create,_qtynew_create_ammo_rest];
|
||||
};
|
||||
sleep 1;
|
||||
uiSleep 1;
|
||||
r_action_count = 0;
|
||||
@@ -22,7 +22,7 @@ player removeMagazine _item;
|
||||
_location = getPosATL player;
|
||||
|
||||
player playActionNow "PutDown";
|
||||
sleep 1;
|
||||
uiSleep 1;
|
||||
|
||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
_object setDir (getDir player);
|
||||
|
||||
@@ -90,7 +90,7 @@ while {r_doLoop} do {
|
||||
if (r_interrupt ) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
uiSleep 0.1;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ _infoText = "";
|
||||
//Tear the clothes
|
||||
player playActionNow "Medic";
|
||||
[player,"bandage",0,false] call dayz_zombieSpeak;
|
||||
sleep 6;
|
||||
uiSleep 6;
|
||||
player removeMagazine _skin;
|
||||
|
||||
switch (_rounded) do {
|
||||
@@ -39,7 +39,7 @@ while {_i < _rounded} do {
|
||||
if (_rnd < 0.5) then {
|
||||
[player,"equip_string"] call BIS_fnc_invAdd;
|
||||
};
|
||||
sleep 0.03;
|
||||
uiSleep 0.03;
|
||||
|
||||
if (!_result) then {
|
||||
systemchat (localize ("str_tear_clothes_noroom"));
|
||||
|
||||
@@ -32,6 +32,6 @@ if (_removeWeapon in (weapons player)) then {
|
||||
};
|
||||
} else {
|
||||
closedialog 0;
|
||||
sleep 0.2;
|
||||
uiSleep 0.2;
|
||||
cutText [format[ localize "str_missingweapon", _text, _removeWeapon] , "PLAIN DOWN"]
|
||||
};
|
||||
@@ -43,7 +43,7 @@ if (_hasToolbox) then {
|
||||
if (_isMedic) then { _started = true; };
|
||||
if (_started and !_isMedic) then { r_doLoop = false; _finished = true; };
|
||||
if (r_interrupt) then { r_doLoop = false; };
|
||||
sleep 0.1;
|
||||
uiSleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ if (_isMan or _isAnimal or _isZombie) exitWith { cutText [localize "str_siphon_n
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
uiSleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
@@ -91,7 +91,7 @@ if (_isMan or _isAnimal or _isZombie) exitWith { cutText [localize "str_siphon_n
|
||||
} else {
|
||||
// Alternate method in water make sure player stays in one spot for 6 seconds
|
||||
_location1 = getPosATL player;
|
||||
sleep 6;
|
||||
uiSleep 6;
|
||||
_location2 = getPosATL player;
|
||||
if(_location1 distance _location2 < 3) then {
|
||||
_finished = true;
|
||||
@@ -133,7 +133,7 @@ if (_isMan or _isAnimal or _isZombie) exitWith { cutText [localize "str_siphon_n
|
||||
call fnc_usec_medic_removeActions;
|
||||
r_action = false;
|
||||
|
||||
sleep 1;
|
||||
uiSleep 1;
|
||||
} else {
|
||||
_abort = true;
|
||||
};
|
||||
|
||||
@@ -15,7 +15,7 @@ _c = PVCDZ_plr_plantSpawner select 2; // random generator for plant type 0..2 a
|
||||
_blacklist = PVCDZ_plr_plantSpawner select 3;
|
||||
_plantcount = 0;
|
||||
_maxperspot = ceil (dayz_maxGlobalPlants / 2048 * 5);
|
||||
[] spawn { sleep 90; dayz_plantSpawner_done = 2; }; // force dayz_plantSpawner_done to unlock player on login page
|
||||
[] spawn { uiSleep 90; dayz_plantSpawner_done = 2; }; // force dayz_plantSpawner_done to unlock player on login page
|
||||
//diag_log [ diag_tickTime, __FILE__, "Starting plantmax/a/b/c/blacklist/_maxperspot: ", dayz_maxGlobalPlants, _a, _b, _c, _blacklist , _maxperspot];
|
||||
|
||||
_insideloop = {
|
||||
|
||||
@@ -160,7 +160,7 @@ if (isPlayer cursorTarget) then {
|
||||
_y = _y + 1;
|
||||
_vehicle = (_vehClose select _y);
|
||||
_vehType = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayName");
|
||||
sleep 0.001;
|
||||
uiSleep 0.001;
|
||||
};
|
||||
_action = _unit addAction [format[localize "str_actions_medical_03",_vehType], "\z\addons\dayz_code\medical\load\load_act.sqf",[player,_vehicle,_unit], 0, true, true];
|
||||
r_player_actions set [count r_player_actions,_action];
|
||||
|
||||
@@ -85,9 +85,9 @@ if (_unit == player) then
|
||||
_unit = _this select 0;
|
||||
cutText [localize "str_player_tranquilized", "PLAIN DOWN"];
|
||||
//systemChat format ["YOU HAVE BEEN TRANQUILISED"];
|
||||
//sleep 2;
|
||||
//uiSleep 2;
|
||||
// 0 fadeSound 0.05;
|
||||
//sleep 5;
|
||||
//uiSleep 5;
|
||||
[_unit,0.01] call fnc_usec_damageUnconscious;
|
||||
_unit setVariable ["NORRN_unconscious", true, true];
|
||||
r_player_timeout = round(random 60);
|
||||
|
||||
@@ -98,7 +98,7 @@ switch _class do {
|
||||
|
||||
_dir = if (_isPlayer) then {getDir(_pos)} else {0};
|
||||
_obj = _class createVehicleLocal (getMarkerpos "respawn_west");
|
||||
sleep 0.01;
|
||||
uiSleep 0.01;
|
||||
_size = _obj call _realSize;
|
||||
if (_isPlayer) then { _size = _size + (_pos call _realSize); };
|
||||
|
||||
@@ -110,7 +110,7 @@ _new set [2, 0];
|
||||
// place a temporary object (not colliding or can colliding)
|
||||
if (_noCollision) then {
|
||||
deleteVehicle _obj;
|
||||
sleep 0.01;
|
||||
uiSleep 0.01;
|
||||
_obj = _class createVehicleLocal _new;
|
||||
// get non colliding position
|
||||
_new = getPosATL _obj;
|
||||
@@ -131,7 +131,7 @@ if (_testBuilding) then { // let's proceed to the "something or its operator in
|
||||
};
|
||||
|
||||
deleteVehicle _obj;
|
||||
sleep 0.01;
|
||||
uiSleep 0.01;
|
||||
|
||||
if (_testPond) then { // let's proceed to the "object in the pond" test (not dirty)
|
||||
_testPond = false;
|
||||
|
||||
@@ -63,7 +63,7 @@ _sandLevel = ctrlPosition ((uiNamespace getVariable 'DAYZ_GUI_waiting') displayC
|
||||
//diag_log [(diag_tickTime - _start) < _timeout , !r_player_unconscious , alive player ];
|
||||
|
||||
// delay so that the character does not stop before falling:
|
||||
_disableHdlr = [] spawn { sleep 2; disableUserInput true; r_player_unconsciousInputDisabled = true; };
|
||||
_disableHdlr = [] spawn { uiSleep 2; disableUserInput true; r_player_unconsciousInputDisabled = true; };
|
||||
|
||||
player playAction "CanNotMove";
|
||||
"dynamicBlur" ppEffectEnable true;"dynamicBlur" ppEffectAdjust [2]; "dynamicBlur" ppEffectCommit 0;
|
||||
@@ -87,12 +87,12 @@ while { (diag_tickTime - _start) < _timeout and r_player_unconscious and alive p
|
||||
} else {
|
||||
player action ["eject", _veh];
|
||||
player leaveVehicle _veh;
|
||||
[] spawn { sleep 0.1; player switchmove "amovppnemstpsnonwnondnon"; }; // instant prone
|
||||
[] spawn { uiSleep 0.1; player switchmove "amovppnemstpsnonwnondnon"; }; // instant prone
|
||||
};
|
||||
};
|
||||
|
||||
if (player == _veh) then { player setVelocity [0,0,0]; };
|
||||
sleep 0.1;
|
||||
uiSleep 0.1;
|
||||
_count = _count + 1;
|
||||
|
||||
};
|
||||
|
||||
@@ -42,7 +42,7 @@ if ((_ammo isKindOf "SmokeShell") or (_ammo isKindOf "GrenadeHandTimedWest") or
|
||||
if (_ammo isKindOf "SmokeShell") then {
|
||||
while { ((getPosATL _projectile) select 2) >= 1 } do {
|
||||
_pos = getPosATL _projectile;
|
||||
sleep 0.01;
|
||||
uiSleep 0.01;
|
||||
};
|
||||
|
||||
_listTalk = _pos nearEntities ["zZombie_Base",50];
|
||||
@@ -74,7 +74,7 @@ if ((_ammo isKindOf "SmokeShell") or (_ammo isKindOf "GrenadeHandTimedWest") or
|
||||
} else {
|
||||
while { alive _projectile } do {
|
||||
_pos = getPosATL _projectile;
|
||||
sleep 0.01;
|
||||
uiSleep 0.01;
|
||||
};
|
||||
|
||||
_listTalk = _pos nearEntities ["zZombie_Base",50];
|
||||
|
||||
@@ -16,7 +16,7 @@ if (_object == player) then {
|
||||
private ["_endtime","_wait"];
|
||||
_wait = _this select 0;
|
||||
_endTime = diag_tickTime + _wait;
|
||||
waitUntil { sleep 1; diag_tickTime > _endTime };
|
||||
waitUntil { uisleep 1; diag_tickTime > _endTime };
|
||||
player setVariable ["FTcounter",((player getVariable ["FTcounter",0]) - _wait)];
|
||||
if ((player getVariable ["FTcounter",0]) <= 0) then {
|
||||
player setVariable ["FTcounter",0];
|
||||
|
||||
@@ -253,7 +253,7 @@ if (_isVehicle) then {
|
||||
while { _i < 5 } do {
|
||||
player setDir ((getDir player) + _step);
|
||||
_i = _i + 1;
|
||||
sleep 0.01;
|
||||
uiSleep 0.01;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -273,7 +273,7 @@ if (_isVehicle) then {
|
||||
while { _i < 5 } do {
|
||||
player setDir ((getDir player) - _step);
|
||||
_i = _i + 1;
|
||||
sleep 0.01;
|
||||
uiSleep 0.01;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ _unit setDir _dir;
|
||||
[objNull, _unit, rPlayMove, _move] call RE;
|
||||
|
||||
//Wait
|
||||
sleep 0.3;
|
||||
uiSleep 0.3;
|
||||
|
||||
if (_vehicle != player) then {
|
||||
_hpList = _vehicle call vehicle_getHitpoints;
|
||||
|
||||
@@ -9,8 +9,8 @@ for "_i" from ((count _list) - 1) to 0 step -1 do
|
||||
_position = getArray (_config >> "position");
|
||||
_object = nearestObject [_position,_type];
|
||||
deleteVehicle _object;
|
||||
if ((_i % 25) == 0) then { sleep 0.01; };
|
||||
if ((_i % 25) == 0) then { uiSleep 0.01; };
|
||||
};
|
||||
sleep 0.001;
|
||||
uiSleep 0.001;
|
||||
};
|
||||
//diag_log ("CLEAR: " + str(_this));
|
||||
|
||||
@@ -19,7 +19,7 @@ for "_i" from ((count _list) - 1) to 0 step -1 do
|
||||
_object setPosATL _position;
|
||||
_object allowDamage false;
|
||||
_object setVariable ["", true]; // SV used by player_spawnCheck
|
||||
//if (_w8 AND {((_i % 25) == 0)}) then { sleep 0.01; };
|
||||
//if (_w8 AND {((_i % 25) == 0)}) then { uiSleep 0.01; };
|
||||
|
||||
} else {
|
||||
if (!_inVehicle) then {
|
||||
@@ -29,11 +29,11 @@ for "_i" from ((count _list) - 1) to 0 step -1 do
|
||||
_object setPosATL _position;
|
||||
_object allowDamage false;
|
||||
_object setVariable ["", true]; // SV used by player_spawnCheck
|
||||
if (_w8 AND {((_i % 25) == 0)}) then { sleep 0.01; };
|
||||
if (_w8 AND {((_i % 25) == 0)}) then { uiSleep 0.01; };
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
//sleep 0.001;
|
||||
//uiSleep 0.001;
|
||||
};
|
||||
//diag_log ("FILL: " + str(_list));
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/***********************************************************
|
||||
ASSIGN DAMAGE TO A UNIT.
|
||||
Called by "HandleDamage" vehicle Event Handler
|
||||
or by "PVCDZ_veh_SH" PV
|
||||
or by "PVCDZE_veh_SH" PV
|
||||
or by zombie_attack
|
||||
|
||||
- Function fnc_veh_handleDam
|
||||
|
||||
@@ -52,7 +52,7 @@ _cantSee = {
|
||||
};
|
||||
};
|
||||
if (!_isok) exitWith {false};
|
||||
sleep 0.001;
|
||||
uiSleep 0.001;
|
||||
} forEach playableUnits;
|
||||
|
||||
_isok
|
||||
@@ -91,7 +91,7 @@ if ((_maxlocalspawned < _maxControlledZombies) and (dayz_CurrentNearByZombies <
|
||||
};
|
||||
|
||||
_agent = createAgent [_type, _position, [], _radius, _method];
|
||||
sleep 0.03;
|
||||
uiSleep 0.03;
|
||||
|
||||
//add to global counter
|
||||
dayz_spawnZombies = dayz_spawnZombies + 1;
|
||||
@@ -119,7 +119,7 @@ if ((_maxlocalspawned < _maxControlledZombies) and (dayz_CurrentNearByZombies <
|
||||
|
||||
if (!isNull _agent) then {
|
||||
_agent setDir random 360;
|
||||
sleep 0.03;
|
||||
uiSleep 0.03;
|
||||
|
||||
_position = getPosATL _agent;
|
||||
|
||||
|
||||
@@ -590,7 +590,7 @@ if (!isDedicated) then {
|
||||
private "_delay";
|
||||
_delay = ((10000 + _humanity) / 5500) + 0.3;
|
||||
playSound "heartbeat_1";
|
||||
sleep _delay;
|
||||
uiSleep _delay;
|
||||
};
|
||||
dayz_heartBeat = false;
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"norrnRaLW" addPublicVariableEventHandler {(_this select 1) execVM "\z\addons\dayz_code\medical\publicEH\load_wounded.sqf"};
|
||||
"norrnRLact" addPublicVariableEventHandler {(_this select 1) execVM "\z\addons\dayz_code\medical\load\load_wounded.sqf"};
|
||||
"norrnRDead" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\medical\publicEH\deadState.sqf"};
|
||||
"usecBleed" addPublicVariableEventHandler {_id = (_this select 1) spawn fnc_usec_damageBleed};
|
||||
//"usecBleed" addPublicVariableEventHandler {_id = (_this select 1) spawn fnc_usec_damageBleed};
|
||||
//"usecBandage" addPublicVariableEventHandler {(_this select 1) call player_medBandage};
|
||||
"usecInject" addPublicVariableEventHandler {(_this select 1) call player_medInject};
|
||||
//"usecEpi" addPublicVariableEventHandler {(_this select 1) call player_medEpi};
|
||||
@@ -12,6 +12,11 @@
|
||||
"PVDZE_plr_Hit" addPublicVariableEventHandler {(_this select 1) call fnc_usec_damageHandler};
|
||||
"PVDZE_plr_HitV" addPublicVariableEventHandler {(_this select 1) call fnc_usec_damageVehicle};
|
||||
//"usecBreakLegs" addPublicVariableEventHandler {(_this select 1) call player_breaklegs};
|
||||
"PVDZ_hlt_Bleed" addPublicVariableEventHandler {(_this select 1) spawn fnc_usec_damageBleed};
|
||||
"PVDZ_veh_SF" addPublicVariableEventHandler {(_this select 1) call fnc_veh_handleRepair}; // repair a part from a vehicle
|
||||
"PVCDZ_obj_HideBody" addPublicVariableEventHandler {hideBody (_this select 1)};
|
||||
"PVCDZ_obj_GutBody" addPublicVariableEventHandler {(_this select 1) spawn local_gutObject};
|
||||
"PVCDZ_veh_SetFuel" addPublicVariableEventHandler {(_this select 1) spawn local_setFuel};
|
||||
|
||||
//Both
|
||||
"PVCDZE_veh_SetFuel" addPublicVariableEventHandler {(_this select 1) spawn local_setFuel};
|
||||
|
||||
@@ -1,13 +1,46 @@
|
||||
private ["_hasMeds","_med"];
|
||||
_med = "ItemAntibiotic";
|
||||
_hasMeds = _med in magazines player;
|
||||
if (_hasMeds) then {
|
||||
player removeMagazine _med;
|
||||
};
|
||||
//remove option
|
||||
// player removeAction s_player_antiobiotic;
|
||||
//s_player_antiobiotic = -1;
|
||||
#include "\z\addons\dayz_code\util\array.hpp";
|
||||
|
||||
//remove infection
|
||||
r_player_infected = false;
|
||||
player setVariable["USEC_infected",false,true];
|
||||
private ["_msg","_antibiotics","_hasAntibiotics","_id","_hasMeds","_unit"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_medsUsed = _this select 1;
|
||||
_antibiotics =["ItemAntibiotic","ItemAntibiotic1","ItemAntibiotic2","ItemAntibiotic3","ItemAntibiotic4","ItemAntibiotic5","ItemAntibiotic6"];
|
||||
|
||||
_hasAntibiotics = Array_Any(magazines player, {_this in _antibiotics});
|
||||
|
||||
_msg = "You seem to have misplaced your antibiotics.";
|
||||
|
||||
if (_hasAntibiotics) then {
|
||||
//Remove one table from the box.
|
||||
[_medsUsed,"medical"] call dayz_reduceItems;
|
||||
|
||||
//remove infection
|
||||
r_player_infected = false;
|
||||
_unit setVariable["USEC_infected",false,true];
|
||||
|
||||
//remove option
|
||||
call fnc_usec_medic_removeActions;
|
||||
r_action = false;
|
||||
|
||||
//player removeAction s_player_antiobiotic;
|
||||
//s_player_antiobiotic = -1;
|
||||
|
||||
if ((_unit == player) or (vehicle player != player)) then {
|
||||
//Self Healing
|
||||
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medAntibiotics.sqf";
|
||||
|
||||
_msg = "You have taken antibiotics.";
|
||||
} else {
|
||||
//Send request to other player
|
||||
PVDZE_send = [_unit,"Antibiotics",[_unit,player]];
|
||||
publicVariableServer "PVDZE_send";
|
||||
|
||||
//Give humnaity for good deeds
|
||||
[player,20] call player_humanityChange;
|
||||
|
||||
_msg = "You gave antibiotics.";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
_msg call dayz_rollingMessages;
|
||||
@@ -1,10 +1,10 @@
|
||||
// bleed.sqf
|
||||
|
||||
private ["_started","_finished","_animState","_isMedic","_id","_unit","_display"];
|
||||
|
||||
disableserialization;
|
||||
private ["_started","_finished","_animState","_isMedic","_id","_unit","_item"];
|
||||
|
||||
_unit = (_this select 3) select 0;
|
||||
_item = (_this select 3) select 1;
|
||||
|
||||
player removeMagazine _item;
|
||||
closedialog 0;
|
||||
|
||||
call fnc_usec_medic_removeActions;
|
||||
r_action = false;
|
||||
@@ -14,21 +14,20 @@ if (vehicle player == player) then {
|
||||
player playActionNow "Medic";
|
||||
};
|
||||
|
||||
[1,1] call dayz_HungerThirst;
|
||||
|
||||
r_interrupt = false;
|
||||
_animState = animationState player;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
_finished = false;
|
||||
[player,"bandage",0,false] call dayz_zombieSpeak;
|
||||
|
||||
while {r_doLoop} do {
|
||||
_animState = animationState player;
|
||||
_isMedic = ["medic",_animState] call fnc_inString;
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
};
|
||||
if (_started && !_isMedic) then {
|
||||
if (_started and !_isMedic) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
@@ -40,39 +39,27 @@ while {r_doLoop} do {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
uiSleep 0.1;
|
||||
uisleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
if (_finished) then {
|
||||
|
||||
_num_removed = ([player,"ItemBandage"] call BIS_fnc_invRemove);
|
||||
if(_num_removed == 1) then {
|
||||
|
||||
if (vehicle player != player) then {
|
||||
_display = findDisplay 106;
|
||||
_display closeDisplay 0;
|
||||
};
|
||||
|
||||
if ((_unit == player) || (vehicle player != player)) then {
|
||||
if ((_unit == player) or (vehicle player != player)) then {
|
||||
//Self Healing
|
||||
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medBandaged.sqf";
|
||||
dayz_sourceBleeding = objNull;
|
||||
if (_item=="ItemSepsisBandage") then {
|
||||
r_player_Sepsis = [false, 0];
|
||||
player setVariable ["USEC_Sepsis", false, true];
|
||||
player setVariable ["sepsisStarted", nil];
|
||||
};
|
||||
} else {
|
||||
/* PVS/PVC - Skaronator */
|
||||
PVDZE_send = [_unit,"Bandage",[_unit,player]];
|
||||
publicVariableServer "PVDZE_send";
|
||||
[player,20] call player_humanityChange;
|
||||
};
|
||||
|
||||
{_unit setVariable[_x,false,true];} count USEC_typeOfWounds;
|
||||
_unit setVariable ["USEC_injured",false,true];
|
||||
|
||||
};
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
if (vehicle player == player) then {
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
};
|
||||
player addMagazine _item;
|
||||
};
|
||||
@@ -39,7 +39,7 @@ if (!_hasTester) exitWith {};
|
||||
|
||||
_dialog = createDialog "bloodTest";
|
||||
|
||||
sleep 0.02;
|
||||
uiSleep 0.02;
|
||||
|
||||
_display = uiNamespace getVariable 'DayZ_Blood_Test';
|
||||
_resultsCard_hidden = _display displayCtrl 1288;
|
||||
@@ -210,7 +210,7 @@ if (_allClicked == 4) then {
|
||||
switch (_type) do {
|
||||
case "A" : {
|
||||
if (!_allDisplayed) then {
|
||||
sleep 2;
|
||||
uiSleep 2;
|
||||
if (r_antiA_done and !_antiA_displayed) then {
|
||||
_antiA ctrlSetText (_aglutArray select _rnd1);
|
||||
_antiA_displayed = true;
|
||||
@@ -232,7 +232,7 @@ if (_allClicked == 4) then {
|
||||
};
|
||||
case "B" : {
|
||||
if (!_allDisplayed) then {
|
||||
sleep 2;
|
||||
uiSleep 2;
|
||||
if (r_antiA_done and !_antiA_displayed) then {
|
||||
_antiA ctrlSetText (_wholeArray select _rnd1);
|
||||
_antiA_displayed = true;
|
||||
@@ -254,7 +254,7 @@ if (_allClicked == 4) then {
|
||||
};
|
||||
case "AB" : {
|
||||
if (!_allDisplayed) then {
|
||||
sleep 2;
|
||||
uiSleep 2;
|
||||
if (r_antiA_done and !_antiA_displayed) then {
|
||||
_antiA ctrlSetText (_aglutArray select _rnd1);
|
||||
_antiA_displayed = true;
|
||||
@@ -276,7 +276,7 @@ if (_allClicked == 4) then {
|
||||
};
|
||||
case "O" : {
|
||||
if (!_allDisplayed) then {
|
||||
sleep 2;
|
||||
uiSleep 2;
|
||||
if (r_antiA_done and !_antiA_displayed) then {
|
||||
_antiA ctrlSetText (_wholeArray select _rnd1);
|
||||
_antiA_displayed = true;
|
||||
@@ -310,10 +310,10 @@ if (_allClicked == 4) then {
|
||||
r_doLoop = false;
|
||||
_isDone = true;
|
||||
[] spawn {
|
||||
sleep 7;
|
||||
uiSleep 7;
|
||||
player setVariable["blood_testDone",true,true];
|
||||
player setVariable["medForceUpdate",true];
|
||||
};
|
||||
};
|
||||
sleep 0.01;
|
||||
uiSleep 0.01;
|
||||
};
|
||||
@@ -32,11 +32,11 @@ while {r_doLoop} do {
|
||||
r_doLoop = false;
|
||||
};
|
||||
if (vehicle player != player) then {
|
||||
sleep 3;
|
||||
uiSleep 3;
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
sleep 0.1;
|
||||
uiSleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
/*
|
||||
|
||||
CARRY BODY SCRIPT
|
||||
|
||||
Allows players to carry unconscious bodies
|
||||
|
||||
JULY 2010 - norrin
|
||||
*****************************************************************************************************************************
|
||||
Start carry.sqf
|
||||
*/
|
||||
|
||||
private ["_unit","_dragee","_anim_name","_can_be_revived","_can_be_revived_2"];
|
||||
private ["_unit","_dragee","_pos","_dir"];
|
||||
_dragee = _this select 3;
|
||||
_can_be_revived = NORRN_revive_array select 20;
|
||||
_can_be_revived_2 = NORRN_revive_array select 21;
|
||||
@@ -20,12 +23,11 @@ _dragee setVariable ["NORRN_unit_dragged", true, true];
|
||||
detach _dragee;
|
||||
uiSleep 1.5;
|
||||
// public EH
|
||||
//DayZ CE: PublicVariables are removed in DayZ CE -> Could we also do here - Commit by Skaronator
|
||||
norrnRACarUp = _dragee;
|
||||
publicVariable "norrnRACarUp";
|
||||
_dragee switchMove "ainjpfalmstpsnonwrfldnon_carried_up";
|
||||
norrnRAPicUp = _unit;
|
||||
publicVariable "norrnRAPicUp";
|
||||
//PVDZ_drg_RACarUp = _dragee; // not used
|
||||
//publicVariable "PVDZ_drg_RACarUp"; // not used
|
||||
//_dragee switchMove "ainjpfalmstpsnonwrfldnon_carried_up";
|
||||
//PVDZ_drg_RAPicUp = _unit; // not used
|
||||
//publicVariable "PVDZ_drg_RAPicUp"; // not used
|
||||
_unit switchMove "acinpknlmstpsraswrfldnon_acinpercmrunsraswrfldnon";
|
||||
uiSleep 10;
|
||||
_dragee switchmove "ainjpfalmstpsnonwrfldnon_carried_still";
|
||||
@@ -53,4 +55,5 @@ while {r_carry_sqf} do
|
||||
};
|
||||
uiSleep 0.1;
|
||||
};
|
||||
if (true) exitWith {};
|
||||
|
||||
|
||||
@@ -9,51 +9,52 @@
|
||||
Start carry.sqf
|
||||
*/
|
||||
|
||||
private ["_unit","_dragee","_anim_name","_can_be_revived","_can_be_revived_2"];
|
||||
_dragee = _this select 3;
|
||||
_can_be_revived = NORRN_revive_array select 20;
|
||||
_can_be_revived_2 = NORRN_revive_array select 21;
|
||||
_unit = player;
|
||||
r_carry_sqf = true;
|
||||
r_drag_sqf = false;
|
||||
|
||||
_unit removeAction Norrn_carryAction;
|
||||
if (isNull _dragee) exitWith {};
|
||||
_dragee setVariable ["NORRN_unit_dragged", true, true];
|
||||
detach _dragee;
|
||||
uiSleep 1.5;
|
||||
// public EH
|
||||
norrnRACarUp = _dragee;
|
||||
publicVariable "norrnRACarUp";
|
||||
_dragee switchMove "ainjpfalmstpsnonwrfldnon_carried_up";
|
||||
norrnRAPicUp = _unit;
|
||||
publicVariable "norrnRAPicUp";
|
||||
_unit switchMove "acinpknlmstpsraswrfldnon_acinpercmrunsraswrfldnon";
|
||||
uiSleep 10;
|
||||
_dragee switchmove "ainjpfalmstpsnonwrfldnon_carried_still";
|
||||
_dragee attachto [_unit,[-0.2, 0.2, 0]];
|
||||
|
||||
|
||||
while {r_carry_sqf} do
|
||||
{
|
||||
_anim_name = animationstate _unit;
|
||||
if (!(_dragee getVariable "NORRN_unconscious")) exitWith
|
||||
{
|
||||
detach _dragee;
|
||||
_unit switchMove "";
|
||||
player removeAction Norrn_dropAction;
|
||||
r_carry_sqf = false;
|
||||
};
|
||||
|
||||
//check that dragged unit still exists
|
||||
if (!alive _unit || _anim_name != "acinpknlmstpsraswrfldnon_acinpercmrunsraswrfldnon" && _anim_name != "acinpercmstpsraswrfldnon" && _anim_name != "acinpercmrunsraswrfldf") exitWith
|
||||
{
|
||||
player removeAction NORRN_dropAction;
|
||||
detach _dragee;
|
||||
_unit switchMove "";
|
||||
r_carry_sqf = false;
|
||||
};
|
||||
uiSleep 0.1;
|
||||
};
|
||||
_dragee playActionNow "Die";
|
||||
|
||||
// private ["_unit","_dragee","_pos","_dir"];
|
||||
// _dragee = _this select 3;
|
||||
// _can_be_revived = NORRN_revive_array select 20;
|
||||
// _can_be_revived_2 = NORRN_revive_array select 21;
|
||||
// _unit = player;
|
||||
// r_carry_sqf = true;
|
||||
// r_drag_sqf = false;
|
||||
//
|
||||
// _unit removeAction Norrn_carryAction;
|
||||
// if (isNull _dragee) exitWith {};
|
||||
// _dragee setVariable ["NORRN_unit_dragged", true, true];
|
||||
// detach _dragee;
|
||||
// uiSleep 1.5;
|
||||
// // public EH
|
||||
// PVDZ_drg_RACarUp = _dragee;
|
||||
// publicVariable "PVDZ_drg_RACarUp";
|
||||
// _dragee switchMove "ainjpfalmstpsnonwrfldnon_carried_up";
|
||||
// PVDZ_drg_RAPicUp = _unit;
|
||||
// publicVariable "PVDZ_drg_RAPicUp";
|
||||
// _unit switchMove "acinpknlmstpsraswrfldnon_acinpercmrunsraswrfldnon";
|
||||
// uiSleep 10;
|
||||
// _dragee switchmove "ainjpfalmstpsnonwrfldnon_carried_still";
|
||||
// _dragee attachto [_unit,[-0.2, 0.2, 0]];
|
||||
//
|
||||
//
|
||||
// while {r_carry_sqf} do
|
||||
// {
|
||||
// _anim_name = animationstate _unit;
|
||||
// if (!(_dragee getVariable "NORRN_unconscious")) exitWith
|
||||
// {
|
||||
// detach _dragee;
|
||||
// _unit switchMove "";
|
||||
// player removeAction Norrn_dropAction;
|
||||
// r_carry_sqf = false;
|
||||
// };
|
||||
//
|
||||
// //check that dragged unit still exists
|
||||
// if (!alive _unit || _anim_name != "acinpknlmstpsraswrfldnon_acinpercmrunsraswrfldnon" && _anim_name != "acinpercmstpsraswrfldnon" && _anim_name != "acinpercmrunsraswrfldf") exitWith
|
||||
// {
|
||||
// player removeAction NORRN_dropAction;
|
||||
// detach _dragee;
|
||||
// _unit switchMove "";
|
||||
// r_carry_sqf = false;
|
||||
// };
|
||||
// uiSleep 0.1;
|
||||
// };
|
||||
// _dragee playActionNow "Die";
|
||||
// if (true) exitWith {};
|
||||
//
|
||||
|
||||
@@ -9,36 +9,56 @@
|
||||
Start drag.sqf
|
||||
*/
|
||||
|
||||
private ["_unit","_dragee","_unconscious"];
|
||||
private ["_unit","_dragee","_pos","_dir","_addAction"];
|
||||
_dragee = _this select 3;
|
||||
_unit = player;
|
||||
_unconscious = _dragee getVariable ["NORRN_unconscious", false];
|
||||
_addAction = false;
|
||||
|
||||
if (isNull _dragee) exitWith {};
|
||||
if (!_unconscious) exitWith {};
|
||||
|
||||
//player assumes dragging posture
|
||||
_dragee setVariable ["NORRN_unit_dragged", true, true];
|
||||
_unit playActionNow "grabDrag";
|
||||
uiSleep 2;
|
||||
|
||||
//unconscious unit assumes dragging posture
|
||||
//public EH
|
||||
//["norrnRaDrag",_dragee] call broadcastRpcCallAll;
|
||||
norrnRaDrag = [_dragee];
|
||||
publicVariable "norrnRaDrag";
|
||||
_dragee attachto [_unit,[0.1, 1.01, 0]];
|
||||
uiSleep 0.02;
|
||||
|
||||
//rotate wounded units so that it is facing the correct direction
|
||||
norrnR180 = _dragee;
|
||||
publicVariable "norrnR180";
|
||||
_dragee setDir 180;
|
||||
r_drag_sqf = true;
|
||||
|
||||
//Uneccesary actions removed & drop body added
|
||||
call fnc_usec_medic_removeActions;
|
||||
while {r_drag_sqf} do {
|
||||
if (!_addAction) then {
|
||||
_dragee setVariable ["NORRN_unit_dragged", true, true];
|
||||
|
||||
NORRN_dropAction = player addAction ["Drop body", "\z\addons\dayz_code\medical\drop_body.sqf",_dragee, 0, false, true];
|
||||
//NORRN_carryAction = player addAction ["Carry body", "\z\addons\dayz_code\medical\carry.sqf",_dragee, 0, false, true];
|
||||
uiSleep 1;
|
||||
_unit playActionNow "grabDrag";
|
||||
uiSleep 2;
|
||||
|
||||
//unconscious unit assumes dragging posture
|
||||
//public EH
|
||||
//PVDZ_drg_RaDrag = _dragee;
|
||||
PVDZ_drg_RaDrag = [_dragee];
|
||||
publicVariable "PVDZ_drg_RaDrag";
|
||||
//_dragee switchmove "ainjppnemstpsnonwrfldb_still";
|
||||
_dragee attachto [_unit,[0.1, 1.01, 0]];
|
||||
uiSleep 0.02;
|
||||
|
||||
//rotate wounded units so that it is facing the correct direction
|
||||
//PVDZ_drg_R180 = _dragee; // not used
|
||||
//publicVariable "PVDZ_drg_R180"; // not used
|
||||
_dragee setDir 180;
|
||||
|
||||
//Uneccesary actions removed & drop body added
|
||||
call fnc_usec_medic_removeActions;
|
||||
|
||||
NORRN_dropAction = player addAction [localize "str_actions_medical_dropbody", "\z\addons\dayz_code\medical\drop_body.sqf",_dragee, 0, false, true];
|
||||
//NORRN_carryAction = player addAction ["Carry body", "\z\addons\dayz_code\medical\carry.sqf",_dragee, 0, false, true];
|
||||
uiSleep 1;
|
||||
_addAction = true;
|
||||
};
|
||||
|
||||
if (force_dropBody) then {
|
||||
[cursorTarget, _unit, _unconscious, _dragee] execVM "\z\addons\dayz_code\medical\drop_body.sqf";
|
||||
};
|
||||
|
||||
if (vehicle player != player) then {
|
||||
player action ["eject", vehicle player];
|
||||
cutText [localize "str_actions_medical_dragbody_veh","PLAIN DOWN"];
|
||||
[cursorTarget, _unit, _unconscious, _dragee] execVM "\z\addons\dayz_code\medical\drop_body.sqf";
|
||||
};
|
||||
if (!r_drag_sqf) exitWith {};
|
||||
};
|
||||
|
||||
@@ -8,11 +8,10 @@
|
||||
Start drop_body.sqf
|
||||
*/
|
||||
|
||||
private ["_dragee","_unit"];
|
||||
_dragee = _this select 3;
|
||||
|
||||
player removeAction NORRN_dropAction;
|
||||
player removeAction NORRN_carryAction;
|
||||
//player removeAction NORRN_carryAction;
|
||||
NORRN_remove_drag = true;
|
||||
r_drag_sqf = false;
|
||||
r_carry_sqf = false;
|
||||
@@ -28,5 +27,8 @@ _dragee setVariable ["NORRN_unit_dragged", false, true];
|
||||
|
||||
//lie on back
|
||||
_dragee playMoveNow "ainjppnemstpsnonwrfldnon";
|
||||
norrnRalie = _dragee;
|
||||
publicVariable "norrnRalie";
|
||||
//PVDZ_drg_Ralie = _dragee; // not used
|
||||
//publicVariable "PVDZ_drg_Ralie"; // not used
|
||||
force_dropBody = false;
|
||||
|
||||
if (true) exitWith {};
|
||||
@@ -4,7 +4,7 @@ private ["_unit","_isDead"];
|
||||
_unit = (_this select 3) select 0;
|
||||
_isDead = _unit getVariable["USEC_isDead",false];
|
||||
call fnc_usec_medic_removeActions;
|
||||
[1,1] call dayz_HungerThirst;
|
||||
|
||||
player playActionNow "Medic";
|
||||
player removeMagazine "ItemEpinephrine";
|
||||
|
||||
|
||||
@@ -90,6 +90,9 @@ r_interrupt = false;
|
||||
};
|
||||
|
||||
if (_complete) then {
|
||||
if (!DZE_UseBloodTypes) then {
|
||||
player addMagazine "ItemBloodbag";
|
||||
} else {
|
||||
switch (_bloodType) do {
|
||||
case "A" : {
|
||||
if (_rh) then {
|
||||
@@ -123,6 +126,7 @@ if (_complete) then {
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
} else {
|
||||
diag_log format ["Fill Bag: Something went wrong and the bloodBag was not added!"];
|
||||
};
|
||||
@@ -1,66 +1,6 @@
|
||||
// init_related_scripts.sqf ArmA2 revive
|
||||
// <20> AUGUST 2010 - norrin
|
||||
|
||||
// Functions
|
||||
|
||||
// Added pvEH - scripts modified to remove the need for sending long strings via setVehicleInit to reduce network traffic && JIP load - 04072010
|
||||
|
||||
// INCLUDE REQUIRED GAME CODES
|
||||
#include "\ca\editor\Data\Scripts\dikCodes.h"
|
||||
|
||||
//Settings
|
||||
|
||||
private ["_id","_rnd","_lowBlood"];
|
||||
usec_bandage_recovery = 5; //time to recover after bandaging
|
||||
|
||||
//"colorCorrections" ppEffectEnable true;
|
||||
//"dynamicBlur" ppEffectEnable true;
|
||||
|
||||
//[man2] call fnc_usec_damageHandle;
|
||||
//[player] call fnc_usec_damageHandle;
|
||||
|
||||
//random morphine chance
|
||||
//Epi pen not working chance
|
||||
//Water Unconscious handling
|
||||
// localize "CLIENT: Medical System Initiated";
|
||||
|
||||
while {true} do {
|
||||
//hintSilent format["Injured: %1\nUnconscious: %2 (%7)\nBlood: %5\nPain: %6\nMust Evac: %8\nHandler: %3\nAction: %4\nLeg Damage: %9\nArm Damage: %10\nInfected: %11",r_player_injured,r_player_unconscious,r_player_handler,r_action,r_player_blood,r_player_inpain,r_player_timeout,r_player_dead, player getVariable ["hit_legs",0], player getVariable ["hit_arms",0],r_player_infected];
|
||||
|
||||
if (r_player_blood <= 0) then {
|
||||
[player,900] call fnc_usec_damageUnconscious;
|
||||
_id = [dayz_sourceBleeding,"bled"] spawn player_death;
|
||||
};
|
||||
|
||||
if ((r_player_blood <= 3000) && !r_player_unconscious) then {
|
||||
_rnd = random 100;
|
||||
if (_rnd > 99) then {
|
||||
[player,((random 0.1) + 0.2)] call fnc_usec_damageUnconscious;
|
||||
};
|
||||
};
|
||||
|
||||
//Handle Unconscious player
|
||||
if ((r_player_unconscious) && (!r_player_handler1)) then {
|
||||
//localize "CLIENT: Start Unconscious Function";
|
||||
[] spawn fnc_usec_unconscious;
|
||||
};
|
||||
|
||||
//Handle player bleeding
|
||||
if ((r_player_injured) && (!r_player_handler)) then {
|
||||
r_player_handler = true;
|
||||
uiSleep 1;
|
||||
//localize "CLIENT: Start Player Bleeding";
|
||||
[] spawn fnc_usec_playerBleed; //publicizes the blood value at regular intervals
|
||||
[] spawn fnc_med_publicBlood;
|
||||
};
|
||||
|
||||
//Handle player infection
|
||||
if ((r_player_infected) && (!r_player_handler)) then {
|
||||
r_player_handler = true;
|
||||
uiSleep 1;
|
||||
[] spawn fnc_med_publicBlood;
|
||||
};
|
||||
// moved to dayz_code/system/scheduler/sched_medical.sqf
|
||||
|
||||
while {1==1} do {
|
||||
//Low Blood Effects
|
||||
if (!r_player_unconscious) then {
|
||||
if (((r_player_blood/r_player_bloodTotal) < 0.35)) then {
|
||||
@@ -77,11 +17,10 @@ while {true} do {
|
||||
};
|
||||
uiSleep 0.5;
|
||||
_lowBlood = player getVariable ["USEC_lowBlood", false];
|
||||
if ((r_player_blood < r_player_bloodTotal) && !_lowBlood) then {
|
||||
if ((r_player_blood < r_player_bloodTotal) and !_lowBlood) then {
|
||||
player setVariable["USEC_lowBlood",true,true];
|
||||
};
|
||||
};
|
||||
};
|
||||
uiSleep 1;
|
||||
|
||||
};
|
||||
endLoadingScreen;
|
||||
@@ -12,7 +12,7 @@ r_action = false;
|
||||
r_action_load = false;
|
||||
call fnc_usec_medic_removeActions;
|
||||
|
||||
//_dragger removeAction NORRN_loadWoundedAction;
|
||||
_dragger removeAction NORRN_loadWoundedAction;
|
||||
|
||||
if ((_vcl emptyPositions "cargo") > 0) then
|
||||
{
|
||||
@@ -21,11 +21,11 @@ if ((_vcl emptyPositions "cargo") > 0) then
|
||||
_wounded setVariable ["NORRN_LoadVcl", _vcl, true];
|
||||
uiSleep 1;
|
||||
//["norrnRLact",_wounded] call broadcastRpcCallAll;
|
||||
norrnRLact = [_wounded];
|
||||
[_wounded] execVM "\z\addons\dayz_code\medical\load\load_wounded.sqf";
|
||||
norrnRLact = _wounded;
|
||||
publicVariable "norrnRLact";
|
||||
player removeAction NORRN_dropAction;
|
||||
}else{
|
||||
|
||||
hint "No space left in vehicle";
|
||||
} else {
|
||||
cutText [localize "str_dragnospace", "PLAIN DOWN"];//hint "No space left in vehicle";
|
||||
};
|
||||
NORRN_load_wounded_action = true;
|
||||
@@ -1,7 +1,7 @@
|
||||
// Load_wounded.sqf
|
||||
// OCTOBER 2010 - norrin
|
||||
|
||||
private ["_wounded","_vcl"];
|
||||
private ["_wounded","_vcl","_group"];
|
||||
|
||||
_wounded = _this select 0;
|
||||
|
||||
@@ -14,15 +14,16 @@ _wounded setVariable ["NORRN_unit_dragged", true, true];
|
||||
_wounded assignAsCargo _vcl;
|
||||
_wounded moveInCargo _vcl;
|
||||
uiSleep 1;
|
||||
//["norrnRALW",_wounded] call broadcastRpcCallAll;
|
||||
norrnRALW = [_wounded];
|
||||
publicVariable "norrnRALW";
|
||||
//["norrnRaLW",_wounded] call broadcastRpcCallAll;
|
||||
norrnRaLW = _wounded;
|
||||
publicVariable "norrnRaLW";
|
||||
_wounded switchMove "kia_hmmwv_driver";
|
||||
|
||||
if (local _wounded) then
|
||||
{
|
||||
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
|
||||
if ((vehicle _wounded == _wounded) || (assignedVehicleRole _wounded) select 0 != "Cargo") exitWith
|
||||
{
|
||||
if (_wounded getVariable "NORRN_AIunconscious") then
|
||||
{
|
||||
@@ -33,8 +34,8 @@ if (local _wounded) then
|
||||
_wounded action ["EJECT", _vcl];
|
||||
uiSleep 1;
|
||||
};
|
||||
norrinRAlie = _wounded;
|
||||
publicVariable "norrinRAlie";
|
||||
// PVDZ_drg_RAlie = _wounded; // not used
|
||||
// publicVariable "PVDZ_drg_RAlie"; // not used
|
||||
_wounded switchMove "ainjppnemstpsnonwrfldnon";
|
||||
_wounded setVariable ["NORRN_unit_dragged", false, true];
|
||||
uiSleep 1;
|
||||
@@ -47,3 +48,5 @@ if (local _wounded) then
|
||||
};
|
||||
};
|
||||
uiSleep 0.01;
|
||||
|
||||
if (true) exitWith {};
|
||||
@@ -1,14 +1,14 @@
|
||||
// unLoad_act.sqf
|
||||
// AUGUST 2010 - norrin
|
||||
|
||||
private ["_args","_vcl","_loop","_unit","_name","_crewVcl"];
|
||||
private ["_args","_dragger","_vcl","_wounded"];
|
||||
|
||||
_args = _this select 3;
|
||||
_name = _args select 0;
|
||||
_vcl = _args select 1;
|
||||
_crewVcl = crew _vcl;
|
||||
|
||||
_name removeAction (_this select 2);
|
||||
//_name removeAction NORRN_pullOutAction; // NORRN_pullOutAction is defined anywhere
|
||||
|
||||
for [{ _loop = 0 },{ _loop < count _crewVcl },{ _loop = _loop + 1}] do
|
||||
{
|
||||
@@ -20,11 +20,18 @@ for [{ _loop = 0 },{ _loop < count _crewVcl },{ _loop = _loop + 1}] do
|
||||
uiSleep 0.05;
|
||||
_unit action ["EJECT", _vcl];
|
||||
uiSleep 1;
|
||||
_position = getPosATL _unit;
|
||||
_isOnDeck = getPosASL _unit in LHA_Deck;
|
||||
if (_isOnDeck) then {
|
||||
_unit setPosAsl [(_position select 0), (_position select 1), (LHA_height+1)];
|
||||
};
|
||||
_unit switchMove "";
|
||||
_unit switchMove "ainjppnemstpsnonwrfldnon";
|
||||
uiSleep 0.2;
|
||||
norrnRalie = _unit;
|
||||
publicVariable "norrnRalie";
|
||||
// PVDZ_drg_Ralie = _unit; // not used
|
||||
// publicVariable "PVDZ_drg_Ralie"; // not used
|
||||
};
|
||||
uiSleep 0.1;
|
||||
};
|
||||
|
||||
if (true) exitWith {};
|
||||
@@ -9,13 +9,13 @@ if (!local _wounded) exitWith {};
|
||||
|
||||
r_action = false;
|
||||
|
||||
sleep 1;
|
||||
uiSleep 1;
|
||||
_vcl = _wounded getVariable "NORRN_loadVcl";
|
||||
_wounded setVariable ["NORRN_unit_dragged", true, true];
|
||||
|
||||
_wounded assignAsCargo _vcl;
|
||||
_wounded moveInCargo _vcl;
|
||||
sleep 1;
|
||||
uiSleep 1;
|
||||
//["PVDZ_drg_RaLW",_wounded] call broadcastRpcCallAll;
|
||||
norrnRaLW = _wounded;
|
||||
publicVariable "norrnRaLW";
|
||||
@@ -31,15 +31,15 @@ if (local _wounded) then
|
||||
if (vehicle _wounded != _wounded) then
|
||||
{
|
||||
unassignVehicle _wounded;
|
||||
sleep 0.05;
|
||||
uiSleep 0.05;
|
||||
_wounded action ["EJECT", _vcl];
|
||||
sleep 1;
|
||||
uiSleep 1;
|
||||
};
|
||||
// PVDZ_drg_RAlie = _wounded; // not used
|
||||
// publicVariable "PVDZ_drg_RAlie"; // not used
|
||||
_wounded switchMove "ainjppnemstpsnonwrfldnon";
|
||||
_wounded setVariable ["NORRN_unit_dragged", false, true];
|
||||
sleep 1;
|
||||
uiSleep 1;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -48,5 +48,5 @@ if (local _wounded) then
|
||||
_wounded playMove "BasicDriver";
|
||||
};
|
||||
};
|
||||
sleep 0.01;
|
||||
uiSleep 0.01;
|
||||
if (true) exitWith {};
|
||||
@@ -1,17 +1,14 @@
|
||||
// bleed.sqf
|
||||
|
||||
private ["_started","_finished","_animState","_isMedic","_id","_num_removed","_unit"];
|
||||
|
||||
disableserialization;
|
||||
|
||||
private ["_started","_finished","_animState","_isMedic","_id","_unit"];
|
||||
_unit = (_this select 3) select 0;
|
||||
|
||||
player removeMagazine "ItemMorphine";
|
||||
|
||||
_unit setVariable ["hit_legs",0];
|
||||
_unit setVariable ["hit_hands",0];
|
||||
|
||||
call fnc_usec_medic_removeActions;
|
||||
r_action = false;
|
||||
[1,1] call dayz_HungerThirst;
|
||||
|
||||
if (vehicle player == player) then {
|
||||
//not in a vehicle
|
||||
player playActionNow "Medic";
|
||||
@@ -27,7 +24,7 @@ while {r_doLoop} do {
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
};
|
||||
if (_started && !_isMedic) then {
|
||||
if (_started and !_isMedic) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
@@ -44,29 +41,22 @@ while {r_doLoop} do {
|
||||
r_doLoop = false;
|
||||
|
||||
if (_finished) then {
|
||||
_num_removed = ([player,"ItemMorphine"] call BIS_fnc_invRemove);
|
||||
if(_num_removed == 1) then {
|
||||
|
||||
if (vehicle player != player) then {
|
||||
_display = findDisplay 106;
|
||||
_display closeDisplay 0;
|
||||
};
|
||||
|
||||
if ((_unit == player) || (vehicle player != player)) then {
|
||||
if ((_unit == player) or (vehicle player != player)) then {
|
||||
//Self Healing
|
||||
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medMorphine.sqf";
|
||||
} else {
|
||||
//PVCDZ_plr_Humanity = [player,50];
|
||||
[player,50] call player_humanityChange;
|
||||
};
|
||||
|
||||
/* PVS/PVC - Skaronator */
|
||||
//["PVCDZ_hlt_Morphine",[_unit,player]] call broadcastRpcCallAll;
|
||||
//PVCDZ_hlt_Morphine = [_unit,player];
|
||||
//publicVariable "PVCDZ_hlt_Morphine";
|
||||
PVDZE_send = [_unit,"Morphine",[_unit,player]];
|
||||
publicVariableServer "PVDZE_send";
|
||||
};
|
||||
} else {
|
||||
player addMagazine "ItemMorphine";
|
||||
r_interrupt = false;
|
||||
if (vehicle player == player) then {
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
};
|
||||
};
|
||||
@@ -1,39 +1,27 @@
|
||||
// bleed.sqf
|
||||
|
||||
private ["_id","_unit","_num_removed"];
|
||||
|
||||
disableserialization;
|
||||
|
||||
private ["_id","_unit"];
|
||||
_unit = (_this select 3) select 0;
|
||||
|
||||
_unit setVariable ["USEC_inPain", false, true];
|
||||
|
||||
call fnc_usec_medic_removeActions;
|
||||
r_action = false;
|
||||
|
||||
_num_removed = ([player,"ItemPainkiller"] call BIS_fnc_invRemove);
|
||||
if(_num_removed == 1) then {
|
||||
|
||||
if (vehicle player != player) then {
|
||||
_display = findDisplay 106;
|
||||
_display closeDisplay 0;
|
||||
};
|
||||
|
||||
_unit setVariable ["USEC_inPain", false, true];
|
||||
|
||||
if (vehicle player == player) then {
|
||||
if (vehicle player == player) then {
|
||||
//not in a vehicle
|
||||
player playActionNow "Gear";
|
||||
};
|
||||
};
|
||||
|
||||
if ((_unit == player) || (vehicle player != player)) then {
|
||||
if ((_unit == player) or (vehicle player != player)) then {
|
||||
//Self Healing
|
||||
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medPainkiller.sqf";
|
||||
} else {
|
||||
} else {
|
||||
//PVCDZ_plr_Humanity = [player,20];
|
||||
[player,20] call player_humanityChange;
|
||||
};
|
||||
|
||||
uiSleep 1;
|
||||
//clear the healed player's vision
|
||||
/* PVS/PVC - Skaronator */
|
||||
PVDZE_send = [_unit,"Painkiller",[_unit,player]];
|
||||
publicVariableServer "PVDZE_send";
|
||||
};
|
||||
|
||||
player removeMagazine "ItemPainkiller";
|
||||
|
||||
uiSleep 1;
|
||||
|
||||
PVDZE_send = [_unit,"Painkiller",[_unit,player]];
|
||||
publicVariableServer "PVDZE_send";
|
||||
@@ -5,13 +5,17 @@ _array = _this; //_this select 0;
|
||||
_unit = _array select 0;
|
||||
_medic = _array select 1;
|
||||
|
||||
if ((_unit == player) || (vehicle player != player)) then {
|
||||
if ((_unit == player) or (vehicle player != player)) then {
|
||||
r_player_injured = false;
|
||||
"dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit 5;
|
||||
r_player_handler = false;
|
||||
|
||||
if (r_player_blood == r_player_bloodTotal) then {
|
||||
player setVariable["USEC_lowBlood",false,true];
|
||||
};
|
||||
|
||||
dayz_sourceBleeding = objNull;
|
||||
call fnc_usec_resetWoundPoints;
|
||||
|
||||
//Ensure Control is visible
|
||||
_display = uiNamespace getVariable 'DAYZ_GUI_display';
|
||||
_control = _display displayCtrl 1303;
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
// medBreakLegs.sqf
|
||||
private ["_array","_unit","_attacker","_cnt","_index","_hit","_damage","_wound","_isInjured","_lowBlood"];
|
||||
disableserialization;
|
||||
_array = _this; //_this select 0;
|
||||
_unit = _array select 0;
|
||||
_attacker = _array select 1;
|
||||
|
||||
if (_unit == player && player distance _attacker < 5) then {
|
||||
player setVariable["startcombattimer", 1];
|
||||
// Make bleed
|
||||
if (random 2 < 1) then {
|
||||
// Find hit
|
||||
_cnt = count (DAYZ_woundHit_ok select 1);
|
||||
_index = floor (random _cnt);
|
||||
_index = (DAYZ_woundHit_ok select 1) select _index;
|
||||
_hit = (DAYZ_woundHit_ok select 0) select _index;
|
||||
|
||||
_damage = 0.1 + random (1.2);
|
||||
|
||||
//Record Damage to Minor parts (legs, arms)
|
||||
if (_hit in USEC_MinorWounds) then {
|
||||
[_unit,_hit,_damage] call object_processHit;
|
||||
};
|
||||
|
||||
player setVariable["medForceUpdate",true,true];
|
||||
|
||||
1 call fnc_usec_bulletHit;
|
||||
|
||||
_wound = _hit call fnc_usec_damageGetWound;
|
||||
|
||||
//Create Wound
|
||||
_unit setVariable[_wound,true,true];
|
||||
[_unit,_wound,_hit] spawn fnc_usec_damageBleed;
|
||||
usecBleed = [_unit,_wound,_hit];
|
||||
publicVariable "usecBleed"; //Not sure if this can used over a PVS way, maybe with a rangeCheck like in gutObject.sqf?
|
||||
|
||||
//Set Injured if not already
|
||||
_isInjured = _unit getVariable["USEC_injured",false];
|
||||
if (!_isInjured) then {
|
||||
_unit setVariable["USEC_injured",true,true];
|
||||
dayz_sourceBleeding = _attacker;
|
||||
};
|
||||
//Set ability to give blood
|
||||
_lowBlood = _unit getVariable["USEC_lowBlood",false];
|
||||
if (!_lowBlood) then {
|
||||
_unit setVariable["USEC_lowBlood",true,true];
|
||||
};
|
||||
r_player_injured = true;
|
||||
|
||||
// reduce blood
|
||||
r_player_blood = r_player_blood - 50;
|
||||
|
||||
// Make player infected
|
||||
if (random 5 < 1) then {
|
||||
r_player_infected = true;
|
||||
player setVariable["USEC_infected",true,true];
|
||||
};
|
||||
};
|
||||
|
||||
[_unit,"hit",2,false] call dayz_zombieSpeak;
|
||||
};
|
||||
@@ -1,23 +1,15 @@
|
||||
// animHealed.sqf
|
||||
|
||||
private ["_array","_unit","_medic","_isDead"];
|
||||
// called by PublicVariableEventHandler "PVCDZ_hlt_Epi", received from the server,
|
||||
// because another player sent a PVDZ_send = [_unit,"Epinephrine",[_unit,player,"ItemEpinephrine"]];
|
||||
_array = _this; //_this select 0;
|
||||
_unit = _array select 0;
|
||||
_medic = _array select 1;
|
||||
_unit = _array select 0; // healed
|
||||
_medic = _array select 1; // healer
|
||||
|
||||
_isDead = _unit getVariable["USEC_isDead",false];
|
||||
|
||||
if (local _unit) then {_unit setCaptive false};
|
||||
//if (local _unit) then {_unit setCaptive false}; // captive ????
|
||||
|
||||
if (!_isDead) then {
|
||||
_unit switchMove "AmovPpneMstpSnonWnonDnon_healed";
|
||||
//no need to public broadcast the variables since this runs on every peer
|
||||
_unit setVariable ["NORRN_unconscious", false, false];
|
||||
_unit setVariable ["USEC_isCardiac",false, false];
|
||||
if (_unit == player) then {
|
||||
r_player_unconscious = false;
|
||||
disableUserInput false;
|
||||
r_player_cardiac = false;
|
||||
r_player_handler1 = false;
|
||||
};
|
||||
if (_unit == player and !(_unit getVariable["USEC_isDead",false]) and _medic != _unit and _medic distance _unit < 5) then {
|
||||
_unit setVariable ["NORRN_unconscious", false, false]; r_player_unconscious = false;
|
||||
_unit setVariable ["USEC_isCardiac",false, false]; r_player_cardiac = false;
|
||||
//AmovPpneMstpSnonWnonDnon_healed
|
||||
};
|
||||
@@ -1,11 +1,10 @@
|
||||
// animHealed.sqf
|
||||
private ["_array","_unit","_medic","_display","_control","_id"];
|
||||
private ["_array","_unit","_medic","_display","_control"];
|
||||
disableserialization;
|
||||
_array = _this; //_this select 0;
|
||||
_unit = _array select 0;
|
||||
_medic = _array select 1;
|
||||
|
||||
if ((_unit == player) || (vehicle player != player)) then {
|
||||
if ((_unit == player) or (vehicle player != player)) then {
|
||||
r_fracture_legs = false;
|
||||
r_fracture_arms = false;
|
||||
_unit setHit["legs",0];
|
||||
@@ -16,5 +15,8 @@ if ((_unit == player) || (vehicle player != player)) then {
|
||||
_control = _display displayCtrl 1203;
|
||||
_control ctrlShow false;
|
||||
|
||||
// _id = false spawn dayz_disableRespawn;
|
||||
//_id = false spawn dayz_disableRespawn;
|
||||
};
|
||||
|
||||
_unit setVariable ["hit_legs",0,true];
|
||||
_unit setVariable ["hit_hands",0,true];
|
||||
@@ -1,12 +1,8 @@
|
||||
// animHealed.sqf
|
||||
|
||||
private ["_array","_unit","_medic"];
|
||||
_array = _this; //_this select 0;
|
||||
_unit = _array select 0;
|
||||
_medic = _array select 1;
|
||||
|
||||
if ((_unit == player) || (vehicle player != player)) then {
|
||||
if ((_unit == player) or (vehicle player != player)) then {
|
||||
r_player_inpain = false;
|
||||
R3F_TIRED_Accumulator = 0;
|
||||
"dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit 5;
|
||||
};
|
||||
@@ -1,19 +1,15 @@
|
||||
// bleed.sqf
|
||||
|
||||
private ["_unit","_isDead","_isCardiac"];
|
||||
_unit = (_this select 3);
|
||||
private["_unit","_isDead","_isCardiac"];
|
||||
_unit = _this select 3;
|
||||
_isDead = _unit getVariable["USEC_isDead",false];
|
||||
_isCardiac = _unit getVariable["USEC_isCardiac",false];
|
||||
|
||||
uiSleep 1;
|
||||
if (_isDead) then {
|
||||
TitleText[(localize "str_epoch_player_3"),"PLAIN DOWN",3];
|
||||
cutText [localize "str_pulse_extremely_weak","PLAIN DOWN"];
|
||||
} else {
|
||||
if (_isCardiac) then {
|
||||
TitleText[(localize "str_epoch_player_4"),"PLAIN DOWN",3];
|
||||
cutText [localize "str_pulse_weak","PLAIN DOWN"];
|
||||
} else {
|
||||
TitleText[(localize "str_epoch_player_5"),"PLAIN DOWN",3];
|
||||
cutText [localize "str_pulse_strong","PLAIN DOWN"];
|
||||
};
|
||||
};
|
||||
|
||||
//r_action = false;
|
||||
@@ -11,7 +11,7 @@ r_action = false;
|
||||
if (vehicle player == player) then {
|
||||
player playActionNow "Medic";
|
||||
};
|
||||
[1,1] call dayz_HungerThirst;
|
||||
|
||||
r_interrupt = false;
|
||||
_animState = animationState player;
|
||||
r_doLoop = true;
|
||||
|
||||
@@ -7,7 +7,10 @@ _blood = _unit getVariable ["USEC_BloodQty", 0];
|
||||
_lowBlood = _unit getVariable ["USEC_lowBlood", false];
|
||||
_injured = _unit getVariable ["USEC_injured", false];
|
||||
_inPain = _unit getVariable ["USEC_inPain", false];
|
||||
_lastused = _unit getVariable ["LastTransfusion", time];
|
||||
//_lastused = _unit getVariable ["LastTransfusion", time];
|
||||
_lastused = selfTransfusionTime;
|
||||
_timeout = (DZE_selfTransfuse_Values select 2);
|
||||
if ((round(time - _lastused)) <= _timeout) exitWith {cutText [format[(localize "str_actions_medical_18"),(_timeout - (round(time - _lastused)))] , "PLAIN DOWN"]};
|
||||
|
||||
call gear_ui_init;
|
||||
closeDialog 0;
|
||||
@@ -66,7 +69,7 @@ while {r_doLoop and (_i < 12)} do {
|
||||
|
||||
if (_isMedic and !_started) then {
|
||||
closeDialog 0;
|
||||
diag_log format ["TRANSFUSION: starting blood transfusion (%1 > %2)", name player, name _unit];
|
||||
//diag_log format ["TRANSFUSION: starting blood transfusion (%1 > %2)", name player, name _unit];
|
||||
if (_badBag) then {
|
||||
for "_r" from 0 to 15 do {
|
||||
_bagToRemove = _bagUsed;
|
||||
@@ -119,7 +122,9 @@ while {r_doLoop and (_i < 12)} do {
|
||||
_blood = _unit getVariable ["USEC_BloodQty", 0];
|
||||
|
||||
if (((_blood >= r_player_bloodTotal) and !_badBag and _bagFound) or (_i == 12)) then {
|
||||
diag_log format ["TRANSFUSION: completed blood transfusion successfully (_i = %1)", _i];
|
||||
//diag_log format ["TRANSFUSION: completed blood transfusion successfully (_i = %1)", _i];
|
||||
selfTransfusionTime = time;
|
||||
[_unit, DZE_selfTransfuse_Values] call player_medTransfuse;
|
||||
cutText [localize "str_actions_medical_transfusion_successful", "PLAIN DOWN"];
|
||||
[player,_unit,"loc",rTITLETEXT,localize "str_actions_medical_transfusion_successful","PLAIN DOWN"] call RE;
|
||||
[player,25] call player_humanityChange;
|
||||
@@ -129,13 +134,12 @@ while {r_doLoop and (_i < 12)} do {
|
||||
_isClose = ((player distance _unit) < ((sizeOf typeOf _unit) / 2));
|
||||
|
||||
if (r_interrupt or !_isClose or _forceClose) then {
|
||||
diag_log format ["TRANSFUSION: transfusion was interrupted (r_interrupt: %1 | distance: %2 (%3) | _i = %4)", r_interrupt, player distance _unit, _isClose, _i];
|
||||
cutText [localize "str_actions_medical_transfusion_interrupted", "PLAIN DOWN"];
|
||||
//diag_log format ["TRANSFUSION: transfusion was interrupted (r_interrupt: %1 | distance: %2 (%3) | _i = %4)", r_interrupt, player distance _unit, _isClose, _i]; cutText [localize "str_actions_medical_transfusion_interrupted", "PLAIN DOWN"];
|
||||
[player,_unit,"loc",rTITLETEXT,localize "str_actions_medical_transfusion_interrupted","PLAIN DOWN"] call RE;
|
||||
r_doLoop = false;
|
||||
};
|
||||
|
||||
sleep 0.1;
|
||||
uiSleep 0.1;
|
||||
};
|
||||
|
||||
r_doLoop = false;
|
||||
|
||||
@@ -4,20 +4,14 @@ fnc_usec_damageHandle = {
|
||||
- Function
|
||||
- [unit] call fnc_usec_damageHandle;
|
||||
************************************************************/
|
||||
private ["_unit"];
|
||||
//private["_unit","_eh"];
|
||||
_unit = _this select 0;
|
||||
|
||||
// Remove handle damage override
|
||||
// _unit removeEventHandler ["HandleDamage",temp_handler];
|
||||
|
||||
mydamage_eh1 = _unit addeventhandler ["HandleDamage",{_this call fnc_usec_damageHandler;} ];
|
||||
mydamage_eh2 = _unit addEventHandler ["Fired", {_this call player_fired;}];
|
||||
mydamage_eh3 = _unit addEventHandler ["Killed", {_id = [] spawn player_death;}];
|
||||
};
|
||||
|
||||
fnc_usec_pitchWhine = {
|
||||
|
||||
private ["_visual","_sound"];
|
||||
_visual = _this select 0;
|
||||
_sound = _this select 1;
|
||||
//affect the player
|
||||
@@ -34,33 +28,51 @@ fnc_usec_pitchWhine = {
|
||||
};
|
||||
};
|
||||
|
||||
fnc_usec_damageUnconscious = {
|
||||
private ["_unit","_damage","_inVehicle"];
|
||||
/*
|
||||
//Old system 1.8.6
|
||||
fnc_usec_damageUnconscious1 = {
|
||||
private["_unit","_damage"];
|
||||
_unit = _this select 0;
|
||||
_damage = _this select 1;
|
||||
_inVehicle = (vehicle _unit != _unit);
|
||||
if ((_unit == player) || (vehicle player != player)) then {
|
||||
r_player_timeout = round((((random 2) max 0.1) * _damage) * 20);
|
||||
|
||||
diag_log format["fnc_usec_damageUnconscious: %1,%2,%3",_unit,_damage, player];
|
||||
|
||||
if (_unit == player) then {
|
||||
r_player_timeout = 120 min (round((((random 2) max 0.1) * _damage) * 20));
|
||||
r_player_unconscious = true;
|
||||
player setVariable["medForceUpdate",true,true];
|
||||
};
|
||||
};
|
||||
*/
|
||||
fnc_usec_damageUnconscious = {
|
||||
private["_unit","_damage"];
|
||||
_unit = _this select 0;
|
||||
_damage = _this select 1;
|
||||
|
||||
diag_log format["fnc_usec_damageUnconscious: %1,%2,%3",_unit,_damage, player];
|
||||
|
||||
_inVehicle = (vehicle _unit != _unit);
|
||||
if (_unit == player) then {
|
||||
r_player_timeout = 120 min (round((((random 2) max 0.1) * _damage) * 20));
|
||||
r_player_unconscious = true;
|
||||
|
||||
player setVariable["medForceUpdate",true];
|
||||
player setVariable ["unconsciousTime", r_player_timeout, true];
|
||||
};
|
||||
|
||||
if (_inVehicle) then {
|
||||
_unit spawn {
|
||||
private["_veh","_unit"];
|
||||
_veh = vehicle _this;
|
||||
_unit = _this;
|
||||
waitUntil{(((([_veh] call FNC_GetPos) select 2 < 1) && (speed _veh < 1)) || (!r_player_unconscious))};
|
||||
waitUntil{(((getPosATL _veh select 2 < 1) and (speed _veh < 1)) or (!r_player_unconscious))};
|
||||
if (r_player_unconscious) then {
|
||||
_unit action ["eject", _veh];
|
||||
waitUntil{((vehicle _this) != _this)};
|
||||
uiSleep 1;
|
||||
_unit setVariable ["NORRN_unconscious", true, true];
|
||||
_unit playActionNow "Die";
|
||||
};
|
||||
};
|
||||
} else {
|
||||
_unit setVariable ["NORRN_unconscious", true, true];
|
||||
_unit playActionNow "Die";
|
||||
};
|
||||
};
|
||||
@@ -68,48 +80,28 @@ fnc_usec_damageUnconscious = {
|
||||
//Action Handlers added to init file
|
||||
|
||||
fnc_usec_bulletHit = {
|
||||
private["_commit"];
|
||||
//private["_commit"];
|
||||
_commit = _this;
|
||||
if (!r_player_unconscious) then {
|
||||
"colorCorrections" ppEffectEnable true;"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 0.1], [1, 1, 1, 0.0]];"colorCorrections" ppEffectCommit 0;
|
||||
"dynamicBlur" ppEffectEnable true;"dynamicBlur" ppEffectAdjust [2]; "dynamicBlur" ppEffectCommit 0;
|
||||
addCamShake [5, 0.5, 25];
|
||||
"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 1], [1, 1, 1, 0.0]];"colorCorrections" ppEffectCommit _commit;
|
||||
"colorCorrections" ppEffectEnable true; "colorCorrections" ppEffectAdjust [1, 1.1, -0.02, [0.4,-0.2,-0.2, .04], [1,1,1,0], [1,1,1, 0]]; "colorCorrections" ppEffectCommit 0;
|
||||
"dynamicBlur" ppEffectEnable true;"dynamicBlur" ppEffectAdjust [1]; "dynamicBlur" ppEffectCommit 0;
|
||||
setCamShakeParams [0.05, 4, 1, 3, true]; addCamShake [5, 0.5, 25];
|
||||
"colorCorrections" ppEffectAdjust [1, 1, 0, [0,0,0,0], [1, 1, 1, 1], [1, 1, 1, 1]]; "colorCorrections" ppEffectCommit _commit;
|
||||
"dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit _commit;
|
||||
};
|
||||
};
|
||||
|
||||
fnc_usec_damageType = {
|
||||
private["_damage","_ammo","_type"];
|
||||
_damage = _this select 0;
|
||||
_ammo = _this select 1;
|
||||
_type = 0;
|
||||
if ((_ammo isKindof "Grenade") || (_ammo isKindof "ShellBase") || (_ammo isKindof "TimeBombCore") || (_ammo isKindof "BombCore") || (_ammo isKindof "MissileCore") || (_ammo isKindof "RocketCore") || (_ammo isKindof "FuelExplosion") || (_ammo isKindof "GrenadeBase")) then {
|
||||
_type = 1;
|
||||
};
|
||||
if ((_ammo isKindof "B_127x107_Ball") || (_ammo isKindof "B_127x99_Ball")) then {
|
||||
_type = 2;
|
||||
};
|
||||
if (_ammo isKindof "Melee") then {
|
||||
_type = 3;
|
||||
};
|
||||
|
||||
_type;
|
||||
};
|
||||
|
||||
fnc_usec_damageGetWound = {
|
||||
private["_hit","_sPoint","_options","_rnd","_wound"];
|
||||
//private["_wound"];
|
||||
_hit = format["%1",_this];
|
||||
_sPoint = USEC_woundHit find _hit;
|
||||
_options = USEC_woundPoint select _sPoint;
|
||||
_rnd = floor(random(count _options));
|
||||
_wound = _options select _rnd;
|
||||
_wound;
|
||||
_wound
|
||||
};
|
||||
|
||||
fnc_usec_medic_removeActions = {
|
||||
|
||||
private ["_obj"];
|
||||
_obj = player;
|
||||
{
|
||||
_obj = _x;
|
||||
@@ -124,62 +116,187 @@ fnc_usec_medic_removeActions = {
|
||||
fnc_usec_self_removeActions = {
|
||||
{
|
||||
player removeAction _x;
|
||||
} count r_self_actions;
|
||||
} forEach r_self_actions;
|
||||
r_self_actions = [];
|
||||
};
|
||||
|
||||
fnc_med_publicBlood = {
|
||||
while {(r_player_injured || r_player_infected) && r_player_blood > 0} do {
|
||||
player setVariable["USEC_BloodQty",r_player_blood,true];
|
||||
player setVariable["medForceUpdate",true];
|
||||
uiSleep 5;
|
||||
fnc_usec_calculateBloodPerSec = {
|
||||
private["_bloodLossPerSec","_bloodGainPerSec","_bloodPerSec"];
|
||||
_bloodLossPerSec = 0;
|
||||
_bloodGainPerSec = 0;
|
||||
|
||||
|
||||
if (dayz_thirst >= SleepWater) then {
|
||||
_bloodLossPerSec = _bloodLossPerSec + 10;
|
||||
};
|
||||
|
||||
if (dayz_hunger >= SleepFood) then {
|
||||
_bloodLossPerSec = _bloodLossPerSec + 10;
|
||||
};
|
||||
|
||||
|
||||
if (r_player_injured) then {
|
||||
_bloodLossPerSec = 10;
|
||||
|
||||
{
|
||||
_wounded = player getVariable["hit_"+_x,false];
|
||||
|
||||
if (_wounded) then {
|
||||
_bloodLossPerSec = _bloodLossPerSec + 10;
|
||||
};
|
||||
} forEach USEC_typeOfWounds;
|
||||
};
|
||||
|
||||
//Sepsis
|
||||
if (!r_player_infected) then {
|
||||
if (r_player_Sepsis select 0) then {
|
||||
_time = diag_tickTime - (r_player_Sepsis select 1);
|
||||
if (_time > 900) then {
|
||||
if (_time < 1800) then {
|
||||
_time = ((_time - 900) max 1) min 900;
|
||||
_bloodLossPerSec = _bloodLossPerSec + (_time / 450) + 1;
|
||||
_bloodLossPerSec = _bloodLossPerSec - (_bloodLossPerSec % 1);
|
||||
//hintSilent (format["SetupMedFNCS: Blood Level: %2/12000 bloodLossPerSec %1",_bloodLossPerSec,r_player_blood]);
|
||||
} else {
|
||||
r_player_Sepsis = [false, 0];
|
||||
r_player_infected = true;
|
||||
player setVariable["USEC_infected",true,true];
|
||||
};
|
||||
};
|
||||
|
||||
if ((_time < 1) and (isNil "sepsisStarted")) then {
|
||||
//if (isNil "sepsisStarted") then {
|
||||
//cutText [localize "str_medical_sepsis_warning","PLAIN DOWN",5];
|
||||
systemChat (localize "str_medical_sepsis_warning");
|
||||
player setVariable ["sepsisStarted", _time];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (r_player_infected) then {
|
||||
_bloodLossPerSec = _bloodLossPerSec + 3;
|
||||
};
|
||||
|
||||
//_golbalNutrition = 1200 / (r_player_Nutrition select 0);
|
||||
|
||||
if (r_player_bloodregen > 0) then {
|
||||
_bloodGainPerSec = r_player_bloodregen * 0.1;
|
||||
/*
|
||||
if ((r_player_bloodregen) < 30) then {
|
||||
_bloodGainPerSec = r_player_bloodregen * _golbalNutrition;
|
||||
};
|
||||
|
||||
if ((r_player_bloodregen)< 60) then {
|
||||
_bloodGainPerSec = r_player_bloodregen * _golbalNutrition;
|
||||
};
|
||||
*/
|
||||
|
||||
r_player_bloodregen = (0 max r_player_bloodregen) - (0 max _bloodGainPerSec);
|
||||
};
|
||||
|
||||
r_player_bloodlosspersec = _bloodLossPerSec;
|
||||
r_player_bloodgainpersec = _bloodGainPerSec;
|
||||
|
||||
_bloodPerSec = _bloodGainPerSec - _bloodLossPerSec;
|
||||
/*
|
||||
private [ "_foodVal", "_thirstVal", "_tempVal"];
|
||||
_foodVal = round(100*(1 - (dayz_hunger / SleepFood)));
|
||||
_thirstVal = round(100*(1 - (dayz_thirst / SleepWater)));
|
||||
_tempVal = round(100*(1 - ((dayz_temperatur - dayz_temperaturmin)/(dayz_temperaturmax - dayz_temperaturmin))));
|
||||
|
||||
hintSilent format [ "blood/s: %1\ngain/s: %2\nloss/s: %3\nbloodregen: %4\ninjured: %5\ninfected: %6\nsepsis: %7\ninpain:%15\nblood: %8\nthirst: %9 (%12%%)\nhunger: %10 (%13%%)\ntemp: %11 (%14%%)\nFoodstack: %16\n",
|
||||
_bloodPerSec,
|
||||
r_player_bloodgainpersec,
|
||||
r_player_bloodlosspersec,
|
||||
r_player_bloodregen,
|
||||
r_player_injured,
|
||||
r_player_infected,
|
||||
r_player_Sepsis,
|
||||
r_player_blood,
|
||||
dayz_thirst,
|
||||
dayz_hunger,
|
||||
dayz_temperatur,
|
||||
_thirstVal,
|
||||
_foodVal,
|
||||
_tempVal,
|
||||
r_player_inpain,
|
||||
r_player_foodstack
|
||||
];
|
||||
*/
|
||||
|
||||
r_player_bloodpersec = _bloodPerSec;
|
||||
_bloodPerSec
|
||||
};
|
||||
|
||||
fnc_usec_playerBleed = {
|
||||
private ["_bleedTime","_bleedPerSec","_total","_bTime","_myBleedTime","_id"];
|
||||
_bleedTime = 400; //seconds
|
||||
_total = r_player_bloodTotal;
|
||||
r_player_injured = true;
|
||||
_myBleedTime = (random 300) + 30;
|
||||
_bTime = 0;
|
||||
while {r_player_injured} do {
|
||||
fnc_usec_playerHandleBlood = {
|
||||
private["_bloodPerSec","_elapsedTime"];
|
||||
if (r_player_injured) then { // bleeding
|
||||
_bleedTime = (random 500) + 100;
|
||||
_elapsedTime = 0;
|
||||
|
||||
_bleedPerSec = 30;
|
||||
// If kneeling || crawling reduce bleeding
|
||||
if (dayz_isKneeling && !r_player_unconscious) then{
|
||||
_bleedPerSec = 15;
|
||||
};
|
||||
if (dayz_isCrawling && !r_player_unconscious) then{
|
||||
_bleedPerSec = 7.5;
|
||||
};
|
||||
while {(r_player_injured) and (r_player_blood > 0)} do {
|
||||
_bloodPerSec = [] call fnc_usec_calculateBloodPerSec;
|
||||
r_player_blood = r_player_blood + _bloodPerSec;
|
||||
_elapsedTime = _elapsedTime + 1;
|
||||
|
||||
//bleed out
|
||||
if (r_player_blood > 0) then {
|
||||
r_player_blood = r_player_blood - _bleedPerSec;
|
||||
};
|
||||
_bTime = _bTime + 1;
|
||||
if (_bTime > _myBleedTime) then {
|
||||
if (_elapsedTime > _bleedTime) then {
|
||||
r_player_injured = false;
|
||||
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medBandaged.sqf";
|
||||
dayz_sourceBleeding = objNull;
|
||||
{player setVariable[_x,false,true];} count USEC_woundHit;
|
||||
player setVariable ["USEC_injured",false,true];
|
||||
call fnc_usec_resetWoundPoints;
|
||||
};
|
||||
|
||||
_bloodDiff = r_player_blood - (player getVariable["USEC_BloodQty", 12000]);
|
||||
|
||||
if ((_bloodDiff >= 500) or (_bloodDiff <= -500)) then {
|
||||
player setVariable["USEC_BloodQty",r_player_blood,true];
|
||||
player setVariable["medForceUpdate",true];
|
||||
};
|
||||
|
||||
|
||||
uiSleep 1;
|
||||
};
|
||||
} else { // not bleeding
|
||||
_bloodPerSec = [] call fnc_usec_calculateBloodPerSec;
|
||||
|
||||
if (_bloodPerSec != 0) then {
|
||||
r_player_blood = r_player_blood + _bloodPerSec;
|
||||
};
|
||||
|
||||
_bloodDiff = r_player_blood - (player getVariable["USEC_BloodQty", 12000]);
|
||||
|
||||
|
||||
if ((_bloodDiff >= 500) or (_bloodDiff <= -500)) then {
|
||||
player setVariable["USEC_BloodQty",r_player_blood,true];
|
||||
player setVariable["medForceUpdate",true];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fnc_usec_resetWoundPoints = {
|
||||
{
|
||||
player setVariable["hit_"+_x,false,true];
|
||||
} forEach USEC_typeOfWounds;
|
||||
player setVariable ["USEC_injured",false,true];
|
||||
};
|
||||
|
||||
fnc_usec_damageBleed = {
|
||||
/***********************************************************
|
||||
PROCESS DAMAGE TO A UNIT
|
||||
- Function
|
||||
- Function fnc_usec_damageBleed: Draw a creepy blood stream from a player limb
|
||||
- [_unit, _wound, _injury] call fnc_usec_damageBleed;
|
||||
************************************************************/
|
||||
private ["_unit","_wound","_injury","_modelPos","_point","_source","_rndX"];
|
||||
private["_wound","_modelPos","_point","_source"];
|
||||
_unit = _this select 0;
|
||||
_wound = _this select 1;
|
||||
_injury = _this select 2;
|
||||
//_injury = _this select 2; // not used. damage% ???
|
||||
|
||||
if (isServer) exitWith{}; // no graphical effects on server!
|
||||
/*
|
||||
if ((dayz_bleedingeffect == 1) or (dayz_bleedingeffect == 3)) then {
|
||||
[] spawn fnc_blooddrops;
|
||||
};*/
|
||||
//diag_log format ["%1::fnc_usec_damageBleed %2", __FILE__, _this];
|
||||
|
||||
_modelPos = [0,0,0];
|
||||
|
||||
@@ -197,38 +314,47 @@ fnc_usec_damageBleed = {
|
||||
case "LeftShoulder": {
|
||||
_modelPos = [0,0,0.2];
|
||||
};
|
||||
//added visual wounds to foots
|
||||
case "RightFoot": {
|
||||
_modelPos = [0,0,0.2];
|
||||
};
|
||||
case "LeftFoot": {
|
||||
_modelPos = [0,0,0.2];
|
||||
};
|
||||
};
|
||||
|
||||
while {true} do {
|
||||
while {1 == 1} do {
|
||||
scopeName "main";
|
||||
|
||||
waitUntil {(vehicle _unit == _unit)};
|
||||
|
||||
if ((dayz_bleedingeffect == 2) or (dayz_bleedingeffect == 3)) then {
|
||||
//Blood partical
|
||||
_point = "Logic" createVehicleLocal getPosATL _unit;
|
||||
_source = "#particlesource" createVehicleLocal getPosATL _unit;
|
||||
_source setParticleParams
|
||||
/*Sprite*/ [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 13, 1],"",// File,Ntieth,Index,Count,Loop(Bool)
|
||||
/*Type*/ "Billboard",
|
||||
/*TimmerPer*/ 1,
|
||||
/*Lifetime*/ 0.2,
|
||||
/*Position*/ [0,0,0],
|
||||
/*MoveVelocity*/ [0,0,0.5],
|
||||
/*Simulation*/ 1,0.32,0.1,0.05,//rotationVel,weight,volume,rubbing
|
||||
/*Scale*/ [0.05,0.25],
|
||||
/*Color*/ [[0.2,0.01,0.01,1],[0.2,0.01,0.01,0]],
|
||||
/*AnimSpeed*/ [0.1],
|
||||
/*randDirPeriod*/ 0,
|
||||
/*randDirIntesity*/ 0,
|
||||
/*onTimerScript*/ "",
|
||||
/*DestroyScript*/ "",
|
||||
/*Follow*/ _point];
|
||||
/* Sprite */ [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 13, 1],"", // File,Ntieth,Index,Count,Loop(Bool)
|
||||
/* Type */ "Billboard",
|
||||
/* TimmerPer */ 1,
|
||||
/* Lifetime */ 0.2,
|
||||
/* Position */ [0,0,0],
|
||||
/* MoveVelocity */ [0,0,0.5],
|
||||
/* Simulation */ 1,0.32,0.1,0.05, //rotationVel,weight,volume,rubbing
|
||||
/* Scale */ [0.05,0.25],
|
||||
/* Color */ [[0.2,0.01,0.01,1],[0.2,0.01,0.01,0]],
|
||||
/* AnimSpeed */ [0.1],
|
||||
/* randDirPeriod */ 0,
|
||||
/* randDirIntesity */ 0,
|
||||
/* onTimerScript */ "",
|
||||
/* DestroyScript */ "",
|
||||
/* Follow */ _point];
|
||||
_source setParticleRandom [2, [0, 0, 0], [0.0, 0.0, 0.0], 0, 0.5, [0, 0, 0, 0.1], 0, 0, 10];
|
||||
_source setDropInterval 0.02;
|
||||
_point attachTo [_unit,_modelPos,_wound];
|
||||
};
|
||||
|
||||
uiSleep 5;
|
||||
|
||||
while {((_unit getVariable["USEC_injured",true]) && (alive _unit))} do {
|
||||
while {((_unit getVariable["USEC_injured",true]) and (alive _unit))} do {
|
||||
scopeName "loop";
|
||||
if (vehicle _unit != _unit) then {
|
||||
BreakOut "loop";
|
||||
@@ -247,6 +373,25 @@ fnc_usec_damageBleed = {
|
||||
deleteVehicle _point;
|
||||
};
|
||||
|
||||
//LEGACY BELOW HERE, LEFT IN FOR SCRIPTS THAT MAY REQUIRE THESE FUNCTIONS
|
||||
fnc_usec_damageType = {
|
||||
private["_damage","_ammo","_type"];
|
||||
_damage = _this select 0;
|
||||
_ammo = _this select 1;
|
||||
_type = 0;
|
||||
if ((_ammo isKindof "Grenade") || (_ammo isKindof "ShellBase") || (_ammo isKindof "TimeBombCore") || (_ammo isKindof "BombCore") || (_ammo isKindof "MissileCore") || (_ammo isKindof "RocketCore") || (_ammo isKindof "FuelExplosion") || (_ammo isKindof "GrenadeBase")) then {
|
||||
_type = 1;
|
||||
};
|
||||
if ((_ammo isKindof "B_127x107_Ball") || (_ammo isKindof "B_127x99_Ball")) then {
|
||||
_type = 2;
|
||||
};
|
||||
if (_ammo isKindof "Melee") then {
|
||||
_type = 3;
|
||||
};
|
||||
|
||||
_type;
|
||||
};
|
||||
|
||||
fnc_usec_recoverUncons = {
|
||||
player setVariable ["NORRN_unconscious",false,true];
|
||||
player setVariable ["unconsciousTime",0,true];
|
||||
@@ -266,3 +411,43 @@ fnc_usec_recoverUncons = {
|
||||
player playMoveNow "AmovPpneMstpSnonWnonDnon_healed";
|
||||
};
|
||||
};
|
||||
fnc_med_publicBlood = {
|
||||
while {(r_player_injured || r_player_infected) && r_player_blood > 0} do {
|
||||
player setVariable["USEC_BloodQty",r_player_blood,true];
|
||||
player setVariable["medForceUpdate",true];
|
||||
uiSleep 5;
|
||||
};
|
||||
};
|
||||
|
||||
fnc_usec_playerBleed = {
|
||||
private ["_bleedTime","_bleedPerSec","_total","_bTime","_myBleedTime","_id"];
|
||||
_bleedTime = 400; //seconds
|
||||
_total = r_player_bloodTotal;
|
||||
r_player_injured = true;
|
||||
_myBleedTime = (random 300) + 30;
|
||||
_bTime = 0;
|
||||
while {r_player_injured} do {}
|
||||
_bleedPerSec = 30;
|
||||
// If kneeling || crawling reduce bleeding
|
||||
if (dayz_isKneeling && !r_player_unconscious) then{
|
||||
_bleedPerSec = 15;
|
||||
};
|
||||
if (dayz_isCrawling && !r_player_unconscious) then{
|
||||
_bleedPerSec = 7.5;
|
||||
};
|
||||
//bleed out
|
||||
if (r_player_blood > 0) then {
|
||||
|
||||
r_player_blood = r_player_blood - _bleedPerSec;
|
||||
};
|
||||
_bTime = _bTime + 1;
|
||||
if (_bTime > _myBleedTime) then {
|
||||
r_player_injured = false;
|
||||
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medBandaged.sqf";
|
||||
dayz_sourceBleeding = objNull;
|
||||
{player setVariable[_x,false,true];} count USEC_woundHit;
|
||||
player setVariable ["USEC_injured",false,true];
|
||||
};
|
||||
uiSleep 1;
|
||||
};
|
||||
};
|
||||
@@ -1,59 +1,223 @@
|
||||
private ["_started","_finished","_animState","_isMedic","_num_removed","_unit","_lastused"];
|
||||
// bleed.sqf
|
||||
private ["_bloodAmount","_unit","_blood","_lowBlood","_injured","_inPain","_lastused","_hasTransfusionKit","_animState","_started","_finished","_timer","_i","_isMedic","_isClose","_duration","_rhVal","_bloodBagArrayNeeded","_BBneeded","_bbselect","_bloodBagNeeded","_badBag","_wholeBag","_bagFound","_bagToRemove","_forceClose","_bloodType","_rh","_bloodBagArray","_bbarray_length","_bloodBagWholeNeeded","_haswholebag","_r","_bloodTestdone","_sentRequest"];// bleed.sqf
|
||||
//Get receving unit
|
||||
_unit = (_this select 3) select 0;
|
||||
//_lowBlood = _unit getVariable ["USEC_lowBlood", false];
|
||||
//_injured = _unit getVariable ["USEC_injured", false];
|
||||
//_inPain = _unit getVariable ["USEC_inPain", false];
|
||||
//_lastused = _unit getVariable ["LastTransfusion", time];
|
||||
|
||||
// if (_lastused - time < 60) exitwith {cutText [format[(localize "str_actions_medical_18"),_text] , "PLAIN DOWN"]};
|
||||
//Does the player have a transfusionKit
|
||||
//_hasTransfusionKit = "transfusionKit" in magazines player;
|
||||
|
||||
//Get receving units blood value
|
||||
_blood = _unit getVariable ["USEC_BloodQty", 0];
|
||||
//Get receving units bloodtype
|
||||
_bloodType = _unit getVariable ["blood_type", ""];
|
||||
//Get the receving units RH type
|
||||
_rh = _unit getVariable ["rh_factor", false];
|
||||
//Get status of bloodtest of receving unit
|
||||
_bloodTestdone = _unit getVariable ["blood_testdone", false];
|
||||
r_interrupt = false;
|
||||
|
||||
_badBag = false;
|
||||
_wholeBag = false;
|
||||
_bagFound = false;
|
||||
_forceClose = false;
|
||||
|
||||
//End if the player does not have a transfusion kit
|
||||
//if (!_hasTransfusionKit) exitWith { cutText [localize "str_actions_medical_transfusion_failed_transfusionkit", "PLAIN DOWN"]; };
|
||||
|
||||
//Unconscious timeout for receving unit
|
||||
_duration = if (_blood <= 4000) then { 3 } else { 2 };
|
||||
_bloodBagArray = ["bloodBagANEG","bloodBagAPOS","bloodBagBNEG","bloodBagBPOS","bloodBagABNEG","bloodBagABPOS","bloodBagONEG","bloodBagOPOS","wholeBloodBagANEG","wholeBloodBagAPOS","wholeBloodBagBNEG","wholeBloodBagBPOS","wholeBloodBagABNEG","wholeBloodBagABPOS","wholeBloodBagONEG","wholeBloodBagOPOS"];
|
||||
_bloodBagArrayNeeded = ["ItemBloodbag","bloodBagONEG"];
|
||||
if (_bloodTestdone) then { // if the recipient does not know his blood type, only O- can apply
|
||||
switch (_bloodType) do {
|
||||
case "A" : {
|
||||
if (_rh) then {
|
||||
_bloodBagArrayNeeded = ["ItemBloodbag","bloodBagAPOS","bloodBagANEG","bloodBagONEG","bloodBagOPOS"];
|
||||
} else {
|
||||
_bloodBagArrayNeeded = ["ItemBloodbag","bloodBagANEG","bloodBagONEG"];
|
||||
};
|
||||
};
|
||||
case "B" : {
|
||||
if (_rh) then {
|
||||
_bloodBagArrayNeeded = ["ItemBloodbag","bloodBagBPOS","bloodBagBNEG","bloodBagONEG","bloodBagOPOS"];
|
||||
} else {
|
||||
_bloodBagArrayNeeded = ["ItemBloodbag","bloodBagBNEG","bloodBagONEG"];
|
||||
};
|
||||
};
|
||||
case "AB" : {
|
||||
if (_rh) then {
|
||||
_bloodBagArrayNeeded = ["ItemBloodbag","bloodBagABPOS","bloodBagABNEG","bloodBagANEG","bloodBagAPOS","bloodBagBNEG","bloodBagBPOS","bloodBagONEG","bloodBagOPOS"];
|
||||
} else {
|
||||
_bloodBagArrayNeeded = ["ItemBloodbag","bloodBagABNEG","bloodBagANEG","bloodBagBNEG","bloodBagONEG"];
|
||||
};
|
||||
};
|
||||
case "O" : {
|
||||
if (_rh) then {
|
||||
_bloodBagArrayNeeded = ["ItemBloodbag","bloodBagOPOS","bloodBagONEG"];
|
||||
} else {
|
||||
_bloodBagArrayNeeded = ["ItemBloodbag","bloodBagONEG"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_BBneeded = false;
|
||||
{ if (_x in magazines player) exitWith { _BBneeded = true; _bbselect = _x; }; } count _bloodBagArrayNeeded;
|
||||
|
||||
//No subs for whole blood :(
|
||||
_rhVal = if (_rh) then { "POS" } else { "NEG" };
|
||||
_bloodBagWholeNeeded = "wholeBloodBag" + _bloodType + _rhVal;
|
||||
_haswholebag = _bloodBagWholeNeeded in magazines player;
|
||||
|
||||
if (!_BBneeded and !_haswholebag) then {
|
||||
_badBag = true;
|
||||
};
|
||||
|
||||
//use packed/separated bags first
|
||||
if (_BBneeded) then {
|
||||
_wholeBag = false;
|
||||
} else {
|
||||
if (_haswholebag) then {
|
||||
_wholeBag = true;
|
||||
};
|
||||
};
|
||||
|
||||
call fnc_usec_medic_removeActions;
|
||||
r_action = false;
|
||||
|
||||
// not possible to transfuse while in a vehicle
|
||||
if (vehicle player != player) exitWith { };
|
||||
|
||||
player playActionNow "Medic";
|
||||
|
||||
[1,1] call dayz_HungerThirst;
|
||||
if (vehicle player == player) then {
|
||||
//not in a vehicle
|
||||
player playActionNow "Medic";
|
||||
};
|
||||
|
||||
r_interrupt = false;
|
||||
_animState = animationState player;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
_finished = false;
|
||||
_sentRequest = false;
|
||||
_timer = diag_tickTime;
|
||||
_i = 0;
|
||||
_r = 0;
|
||||
_humanityAwarded = 0;
|
||||
|
||||
_bloodAmount = if (!_wholeBag) then { 12000/*Full bloodbag*/ } else { 4000 /*Whole blood only gives 4k*/ };
|
||||
|
||||
while {r_doLoop} do {
|
||||
_animState = animationState player;
|
||||
_isMedic = ["medic",_animState] call fnc_inString;
|
||||
if (_isMedic) then {
|
||||
|
||||
if (_isMedic and !_started) then {
|
||||
closeDialog 0;
|
||||
//diag_log format ["TRANSFUSION: starting blood transfusion (%1 > %2)", name player, name _unit];
|
||||
if (_badBag) then {
|
||||
for "_r" from 0 to 15 do {
|
||||
//select random bloodbag if the player has more then one of the required types
|
||||
_bagToRemove = _bloodBagArray select _r;
|
||||
//TODO: add separate action menu options so the removed bag isn't random
|
||||
if (_bagToRemove in magazines player) exitWith {
|
||||
_bagFound = true;
|
||||
if (_r >= 8) then {
|
||||
_wholeBag = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
} else {
|
||||
_bagToRemove = if (_wholeBag) then { _bloodBagWholeNeeded } else { _bbselect };
|
||||
if (_bagToRemove in magazines player) then {
|
||||
_bagFound = true;
|
||||
};
|
||||
};
|
||||
if (!_bagFound) then {_forceClose = true;} else { player removeMagazine _bagToRemove;};
|
||||
cutText [localize "str_actions_medical_transfusion_start", "PLAIN DOWN"];
|
||||
//see Note 1
|
||||
//[player,_unit,"loc",rTITLETEXT,format["Transfusion of %1 in progress, remain still...",_bagToRemove],"PLAIN DOWN"] call RE;
|
||||
_started = true;
|
||||
};
|
||||
if (_started && !_isMedic) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
|
||||
if (_started) then {
|
||||
//_sentRequest var stops the pvs running more then once as it's no longer needs too 1.8.4
|
||||
if ((!_sentRequest) And (!_badBag)) then {
|
||||
PVDZ_send = [_unit,"Transfuse",[_unit,player,_bloodAmount]];
|
||||
publicVariableServer "PVDZ_send";
|
||||
_sentRequest = true;
|
||||
};
|
||||
if (r_interrupt) then {
|
||||
if ((diag_tickTime - _timer) >= 1) then {
|
||||
_timer = diag_tickTime;
|
||||
//see Note 1
|
||||
//PVCDZ_hlt_Transfuse = [_unit,player,1000];
|
||||
//publicVariable "PVCDZ_hlt_Transfuse";
|
||||
if (!_wholeBag) then {
|
||||
_i = _i + 1; //Full bloodbag
|
||||
} else {
|
||||
_i = _i + 3; //Whole blood only gives 4k
|
||||
};
|
||||
if (!_badBag) then {
|
||||
if (!_forceClose) then {
|
||||
_bloodAmount = _bloodAmount - 500;
|
||||
//see Note 1
|
||||
//PVDZ_send = [_unit,"Transfuse",[_unit,player,500]];
|
||||
//publicVariableServer "PVDZ_send";
|
||||
|
||||
// 25 points to be givin upto a maximum of 300 points if the player stays for the full duration
|
||||
//This should be better this way to keep calculus simple and prevent people getting points for giving blood transfusions to healthy players (and less humanity for only very small amounts of blood)
|
||||
//Pulled from pullrequest from ILoveBeans
|
||||
if ( _humanityAwarded < 300 ) then {
|
||||
_humanityAwarded = _humanityAwarded + 25 ;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
if (!_forceClose and (_i >= 12)) then {
|
||||
_bloodAmount = 0;
|
||||
PVDZ_sendUnconscious = [_unit,_duration];
|
||||
publicVariableServer "PVDZ_sendUnconscious";
|
||||
|
||||
diag_log ("Transfusion: "+str(PVDZ_sendUnconscious));
|
||||
};
|
||||
};
|
||||
|
||||
cutText [localize "str_actions_medical_transfusion_start", "PLAIN DOWN"];
|
||||
//see Note 1
|
||||
//[player,_unit,"loc",rTITLETEXT,format["Transfusion of %1 in progress, remain still...",_bagToRemove],"PLAIN DOWN"] call RE;
|
||||
|
||||
};
|
||||
if (!_isMedic) then {
|
||||
player playActionNow "Medic";
|
||||
};
|
||||
};
|
||||
|
||||
_blood = _unit getVariable ["USEC_BloodQty", 0];
|
||||
|
||||
if (_blood >= r_player_bloodTotal or _bloodAmount == 0) then {
|
||||
//diag_log format ["TRANSFUSION: completed blood transfusion successfully (_i = %1)", _i];
|
||||
cutText [localize "str_actions_medical_transfusion_successful", "PLAIN DOWN"];
|
||||
//see Note 1
|
||||
//[player,_unit,"loc",rTITLETEXT,localize "str_actions_medical_transfusion_successful","PLAIN DOWN"] call RE;
|
||||
if (!_badBag and _bagFound) then { [player,_humanityAwarded] call player_humanityChange; };
|
||||
r_doLoop = false;
|
||||
};
|
||||
uiSleep 0.1;
|
||||
|
||||
_isClose = ((player distance _unit) < ((sizeOf typeOf _unit) / 2));
|
||||
|
||||
if (r_interrupt or !_isClose or _forceClose) then {
|
||||
//diag_log format ["TRANSFUSION: transfusion was interrupted (r_interrupt: %1 | distance: %2 (%3) | _i = %4)", r_interrupt, player distance _unit, _isClose, _i];
|
||||
cutText [localize "str_actions_medical_transfusion_interrupted", "PLAIN DOWN"];
|
||||
//see Note 1
|
||||
//[player,_unit,"loc",rTITLETEXT,localize "str_actions_medical_transfusion_interrupted","PLAIN DOWN"] call RE;
|
||||
r_doLoop = false;
|
||||
};
|
||||
|
||||
uiSleep 1;
|
||||
};
|
||||
|
||||
r_doLoop = false;
|
||||
|
||||
if (_finished) then {
|
||||
//_unit setVariable["LastTransfusion",time,true]; //reserve for self transfusion
|
||||
_unit setVariable["USEC_lowBlood",false,true];
|
||||
_num_removed = ([player,"ItemBloodbag"] call BIS_fnc_invRemove);
|
||||
if(_num_removed == 1) then {
|
||||
|
||||
/* PVS/PVC - Skaronator */
|
||||
PVDZE_send = [_unit,"Transfuse",[_unit,player]];
|
||||
publicVariableServer "PVDZE_send";
|
||||
|
||||
[player,100] call player_humanityChange;
|
||||
};
|
||||
} else {
|
||||
if (r_interrupt) then {
|
||||
r_interrupt = false;
|
||||
player switchMove "";
|
||||
player playActionNow "stop";
|
||||
};
|
||||
|
||||
/*
|
||||
Note 1 - 1.8 system sending way too much info upto 12 times to the server on top of each call RE also being sent upto 12 times. System removed
|
||||
|
||||
*/
|
||||
|
||||
@@ -30,11 +30,11 @@ while {r_doLoop} do {
|
||||
r_doLoop = false;
|
||||
};
|
||||
if (vehicle player != player) then {
|
||||
sleep 3;
|
||||
uiSleep 3;
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
sleep 0.1;
|
||||
uiSleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ else
|
||||
deleteVehicle _v;
|
||||
_v =(_wreck) createvehicle _pos;
|
||||
{_x moveincargo _v} count _crw;
|
||||
//sleep 0.05;
|
||||
//uiSleep 0.05;
|
||||
_v setvelocity _vel;
|
||||
//_v setPos _pos;
|
||||
_v setvectordir (_dir);
|
||||
|
||||
@@ -278,7 +278,7 @@ if (isServer) then {
|
||||
|
||||
setWind [drn_DynamicWeather_WindX, drn_DynamicWeather_WindZ, true];
|
||||
|
||||
sleep 0.05;
|
||||
uiSleep 0.05;
|
||||
|
||||
publicVariable "drn_var_DynamicWeather_Rain";
|
||||
drn_var_DynamicWeather_ServerInitialized = true;
|
||||
@@ -307,8 +307,8 @@ if (isServer) then {
|
||||
_overcastLevel = 2;
|
||||
|
||||
while {1 == 1} do {
|
||||
// Sleep a while until next weather change
|
||||
sleep floor (_minTimeBetweenWeatherChangesMin * 60 + random ((_maxTimeBetweenWeatherChangesMin - _minTimeBetweenWeatherChangesMin) * 60));
|
||||
// uiSleep a while until next weather change
|
||||
uiSleep floor (_minTimeBetweenWeatherChangesMin * 60 + random ((_maxTimeBetweenWeatherChangesMin - _minTimeBetweenWeatherChangesMin) * 60));
|
||||
|
||||
if (_minimumFog == _maximumFog && _minimumOvercast != _maximumOvercast) then {
|
||||
_weatherType = "OVERCAST";
|
||||
@@ -435,7 +435,7 @@ if (isServer) then {
|
||||
|
||||
call drn_fnc_DynamicWeather_SetWeatherAllClients;
|
||||
|
||||
sleep _weatherChangeTimeSek;
|
||||
uiSleep _weatherChangeTimeSek;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -506,10 +506,10 @@ if (isServer) then {
|
||||
};
|
||||
|
||||
if (_debug) then {
|
||||
sleep 1;
|
||||
uisleep 1;
|
||||
}
|
||||
else {
|
||||
sleep 10;
|
||||
uisleep 10;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -538,7 +538,7 @@ drn_var_rainRoutine = [_rainIntervalRainProbability, _debug] spawn {
|
||||
};
|
||||
|
||||
0 setRain _rain;
|
||||
sleep 0.1;
|
||||
uiSleep 0.1;
|
||||
|
||||
while {1 == 1} do {
|
||||
if (_rainIntervalRainProbability > 0) then {
|
||||
@@ -557,7 +557,7 @@ drn_var_rainRoutine = [_rainIntervalRainProbability, _debug] spawn {
|
||||
|
||||
3 setRain _rain;
|
||||
|
||||
sleep 3;
|
||||
uiSleep 3;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ _ShuffleArray = {
|
||||
_rand_array set [count _rand_array, _ar select _rand];
|
||||
_ar set [_rand, "randarray_del"];
|
||||
_ar = _ar - ["randarray_del"];
|
||||
sleep 0.001;
|
||||
uiSleep 0.001;
|
||||
};
|
||||
_rand_array;
|
||||
};
|
||||
@@ -52,7 +52,7 @@ _activeArray = [];
|
||||
_i = _i + 1;
|
||||
};
|
||||
_t = _t + 1;
|
||||
sleep 0.01;
|
||||
uiSleep 0.01;
|
||||
}count _infectedWaterHoles;
|
||||
//diag_log [ diag_tickTime, __FILE__, "Infectious waterholes Max,Spawned,Active:",_t,_i,_activeArray];
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2021,7 +2021,7 @@ class FSM
|
||||
"_nearestCity = nearestLocations [getPos player, [""NameCityCapital"",""NameCity"",""NameVillage"",""NameLocal""],1000];" \n
|
||||
"Dayz_logonTown = ""Wilderness"";" \n
|
||||
"if (count _nearestCity > 0) then {Dayz_logonTown = text (_nearestCity select 0)};" \n
|
||||
"[_world,Dayz_logonTown,format[localize ""str_player_06"",dayz_Survived]] spawn { sleep 5; _this spawn BIS_fnc_infoText;};" \n
|
||||
"[_world,Dayz_logonTown,format[localize ""str_player_06"",dayz_Survived]] spawn { uiSleep 5; _this spawn BIS_fnc_infoText;};" \n
|
||||
"dayzGearSave = true;" \n
|
||||
"dayz_myPosition = getPosATL player;" \n
|
||||
"Dayz_loginCompleted = true;" \n
|
||||
|
||||
@@ -389,7 +389,7 @@ dayz_myLoad = (((count dayz_myBackpackMags) * 0.2) + (count dayz_myBackpackWpns)
|
||||
//setGroupIconsVisible [false,false];
|
||||
//clearGroupIcons group player;
|
||||
|
||||
sleep 2;
|
||||
uiSleep 2;
|
||||
|
||||
_myPos = player getVariable["lastPos",[]];
|
||||
if (count _myPos > 0) then {
|
||||
|
||||
@@ -6,7 +6,7 @@ _timeoutStart=diag_ticktime;
|
||||
while {true} do {
|
||||
if (diag_ticktime - _timeoutStart >= 120) exitWith {
|
||||
1 cutText [localize "str_player_login_timeout", "PLAIN DOWN"];
|
||||
sleep 5;
|
||||
uiSleep 5;
|
||||
endMission "END1";
|
||||
};
|
||||
if ((!isNil "Dayz_loginCompleted") and {(Dayz_loginCompleted)}) exitWith {
|
||||
@@ -20,7 +20,7 @@ while {true} do {
|
||||
_control2 = _display displayctrl 102;
|
||||
_control2 ctrlSetText format["%1",floor(diag_ticktime - _timeoutStart)];
|
||||
|
||||
sleep 0.2;
|
||||
uiSleep 0.2;
|
||||
//diag_log [ __FILE__, __LINE__, "Looping..."];
|
||||
};
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ sched_medical_effectsSlow = {
|
||||
playSound "breath_1";
|
||||
|
||||
//Lets make sure the spawn ends 1 sec after the _duration timer this should provide a smooth transtion rather then a snap to focus.
|
||||
sleep _duration + 1;
|
||||
uiSleep _duration + 1;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
sched_plantHint = {
|
||||
{
|
||||
(getPosATL _x) spawn {
|
||||
sleep random 10;
|
||||
uiSleep random 10;
|
||||
_sound=format["Sound_Crickets%1",1+floor random 3];
|
||||
//diag_log [ _sound ];
|
||||
_x = createSoundSource [_sound, _this, [], 0];
|
||||
sleep 2;
|
||||
uiSleep 2;
|
||||
deleteVehicle _x;
|
||||
};
|
||||
false
|
||||
|
||||
@@ -13,6 +13,6 @@ if (!isNull _trap) then {
|
||||
dayz_traps set [count dayz_traps, _trap];
|
||||
};
|
||||
|
||||
sleep 0.5;
|
||||
uiSleep 0.5;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
//Returns true if the current script is running in the unscheduled environment and otherwise false.
|
||||
//If true a script error is also produced however this can be ignored.
|
||||
//#define Util_IsUncheduled() ([diag_frameNo, sleep 0.005, diag_frameNo] call { _this select 0 == _this select 2 })
|
||||
//#define Util_IsUncheduled() ([diag_frameNo, uiSleep 0.005, diag_frameNo] call { _this select 0 == _this select 2 })
|
||||
|
||||
/* Send public variables atomically without fear of race conditions. The previous value of the
|
||||
variable is restored automatically after transmission. For example:
|
||||
|
||||
@@ -47,8 +47,8 @@ switch (_variable) do {
|
||||
};
|
||||
|
||||
case "GutBody": {
|
||||
PVCDZ_obj_GutBody = _arraytosend;
|
||||
_owner publicVariableClient "PVCDZ_obj_GutBody";
|
||||
PVCDZE_obj_GutBody = _arraytosend;
|
||||
_owner publicVariableClient "PVCDZE_obj_GutBody";
|
||||
};
|
||||
|
||||
case "HideBody": {
|
||||
@@ -67,8 +67,8 @@ switch (_variable) do {
|
||||
};
|
||||
|
||||
case "Bleed": {
|
||||
usecBleed = _arraytosend;
|
||||
_owner publicVariableClient "usecBleed";
|
||||
PVDZ_hlt_Bleed = _arraytosend;
|
||||
_owner publicVariableClient "PVDZ_hlt_Bleed";
|
||||
};
|
||||
|
||||
case "PVDZE_plr_SetDate": {
|
||||
|
||||
Reference in New Issue
Block a user