diff --git a/SQF/dayz_code/actions/player_attachAttachment.sqf b/SQF/dayz_code/actions/player_attachAttachment.sqf index baf30925d..9703ad2b8 100644 --- a/SQF/dayz_code/actions/player_attachAttachment.sqf +++ b/SQF/dayz_code/actions/player_attachAttachment.sqf @@ -66,6 +66,7 @@ if (!isClass(_config) || {!isText(_config >> _attachment)}) exitWith _newWeapon = getText (_config >> _attachment); _weaponInUse = (currentWeapon player == _weapon); +[player,"attach_weap",0,false] call dayz_zombieSpeak; call gear_ui_init; player playActionNow "Medic"; diff --git a/SQF/dayz_code/actions/player_removeAttachment.sqf b/SQF/dayz_code/actions/player_removeAttachment.sqf index c3e66c761..bd6430144 100644 --- a/SQF/dayz_code/actions/player_removeAttachment.sqf +++ b/SQF/dayz_code/actions/player_removeAttachment.sqf @@ -53,6 +53,7 @@ if (!isClass(_newWeaponConfig) || {getText(_newWeaponConfig >> _attachment) != _ _weaponInUse = (currentWeapon player == _weapon); +[player,"detach_weap",0,false] call dayz_zombieSpeak; call gear_ui_init; player playActionNow "Medic"; diff --git a/SQF/dayz_code/compile/object_speak.sqf b/SQF/dayz_code/compile/object_speak.sqf index 820db5a3b..38c5c7251 100644 --- a/SQF/dayz_code/compile/object_speak.sqf +++ b/SQF/dayz_code/compile/object_speak.sqf @@ -4,44 +4,48 @@ _unit = _this select 0; _type = _this select 1; _chance = _this select 2; -_dis = switch true do { - case (count _this > 4): {_this select 4}; - case (_type in ["shout","hit","attack","scream","breath"]): {100}; - default {40}; +_dis = call { + if (count _this > 4) exitwith {_this select 4}; + if (_type in ["shout","hit","attack","scream","breath"]) exitwith {100}; + 40 }; _local = false; if (count _this > 3) then { _local = _this select 3; }; -if (!_local) then { +if (!_local) then { // we override _local according to number of players inside _dis radius _local = { _unit distance _x < _dis; } count playableUnits <= 1; }; //diag_log(format["%1 dis:%2 local:%3", __FILE__, _dis, _local]); -_num = switch (_type) do { - default {0}; - case "cough": {2}; - case "chase": {14}; - case "spotted": {13}; - case "hit": {6}; - case "attack": {13}; - case "idle": {35}; - case "scream": {4}; - case "fracture": {1}; - case "eat": {3}; - case "cook": {2}; - case "panic": {1}; - case "dog_bark": {4}; - case "dog_growl": {3}; - case "dog_qq": {2}; - case "keypad_tick": {2}; - case "open_backpack": {4}; - case "open_inventory": {4}; +_num = call { + if (_type == "open_inventory") exitwith {4}; + if (_type == "open_backpack") exitwith {4}; + if (_type == "eat") exitwith {3}; + if (_type == "bandage") exitwith {2}; + if (_type == "pills") exitwith {3}; + if (_type == "keypad_tick") exitwith {2}; + if (_type == "spotted") exitwith {13}; + if (_type == "chase") exitwith {14}; + if (_type == "attach_weap") exitwith {1}; + if (_type == "detach_weap") exitwith {1}; + if (_type == "attack") exitwith {13}; + if (_type == "idle") exitwith {35}; + if (_type == "scream") exitwith {4}; + if (_type == "cough") exitwith {2}; + if (_type == "fracture") exitwith {1}; + if (_type == "panic") exitwith {1}; + if (_type == "cook") exitwith {2}; + if (_type == "hit") exitwith {6}; + if (_type == "dog_bark") exitwith {4}; + if (_type == "dog_growl") exitwith {3}; + if (_type == "dog_qq") exitwith {2}; + 0 }; _isWoman = getText(configFile >> "cfgVehicles" >> (typeOf _unit) >> "TextPlural") == "Women"; -if (_isWoman and (_type in ["scream","panic"])) then { +if (_isWoman and {_type in ["scream","panic"]}) then { _type = _type + "_w"; }; diff --git a/SQF/dayz_code/medical/antibiotics.sqf b/SQF/dayz_code/medical/antibiotics.sqf index df5d43100..6953f2c48 100644 --- a/SQF/dayz_code/medical/antibiotics.sqf +++ b/SQF/dayz_code/medical/antibiotics.sqf @@ -26,9 +26,8 @@ if !(isNil "_medsUsed") then { //remove option call fnc_usec_medic_removeActions; r_action = false; - - //player removeAction s_player_antiobiotic; - //s_player_antiobiotic = -1; + + [player,"pills",0,false] call dayz_zombieSpeak; if (_unit == player) then { //Self Healing @@ -48,5 +47,4 @@ if !(isNil "_medsUsed") then { }; }; - _msg call dayz_rollingMessages; diff --git a/SQF/dayz_code/medical/painkiller.sqf b/SQF/dayz_code/medical/painkiller.sqf index fc9234320..8aa0dd853 100644 --- a/SQF/dayz_code/medical/painkiller.sqf +++ b/SQF/dayz_code/medical/painkiller.sqf @@ -29,6 +29,8 @@ if !(isNil "_medsUsed") then { player playActionNow "Gear"; }; + [player,"pills",0,false] call dayz_zombieSpeak; + if (_unit == player) then { //Self Healing [player,player] call player_medPainkiller; @@ -43,4 +45,4 @@ if !(isNil "_medsUsed") then { format [localize "str_actions_medical_painkillers_give",(name _unit)] call dayz_rollingMessages; }; -}; +}; \ No newline at end of file diff --git a/SQF/dayz_sfx/CfgSounds.hpp b/SQF/dayz_sfx/CfgSounds.hpp index 229eb947b..5b6831206 100644 --- a/SQF/dayz_sfx/CfgSounds.hpp +++ b/SQF/dayz_sfx/CfgSounds.hpp @@ -170,6 +170,16 @@ class CfgSounds { sound[] = {"\dayz_sfx\effects\bandage_0.ogg",0.3,1,40}; titles[] = {}; }; + class z_bandage_1 { + name = ""; + sound[] = {"\dayz_sfx\effects\bandage_1.ogg",0.3,1,40}; + titles[] = {}; + }; + class z_bandage_2 { + name = ""; + sound[] = {"\dayz_sfx\effects\bandage_2.ogg",0.3,1,40}; + titles[] = {}; + }; class z_gut_0 { name = ""; sound[] = {"\dayz_sfx\effects\action_gut_0.ogg",0.1,1,30}; @@ -746,6 +756,46 @@ class CfgSounds { titles[] = {}; }; + class z_attach_weap_0 { + name = ""; + sound[] = {"\dayz_sfx\effects\action_attach_0.ogg",1,1,10}; + titles[] = {}; + }; + class z_attach_weap_1 { + name = ""; + sound[] = {"\dayz_sfx\effects\action_attach_1.ogg",1,1,10}; + titles[] = {}; + }; + class z_detach_weap_0 { + name = ""; + sound[] = {"\dayz_sfx\effects\action_detach_0.ogg",1,1,10}; + titles[] = {}; + }; + class z_detach_weap_1 { + name = ""; + sound[] = {"\dayz_sfx\effects\action_detach_1.ogg",1,1,10}; + titles[] = {}; + }; + class z_pills_0 { + name = ""; + sound[] = {"\dayz_sfx\effects\painkiller_0.ogg",1,1,20}; + titles[] = {}; + }; + class z_pills_1 { + name = ""; + sound[] = {"\dayz_sfx\effects\painkiller_1.ogg",1,1,20}; + titles[] = {}; + }; + class z_pills_2 { + name = ""; + sound[] = {"\dayz_sfx\effects\painkiller_2.ogg",1,1,20}; + titles[] = {}; + }; + class z_pills_3 { + name = ""; + sound[] = {"\dayz_sfx\effects\painkiller_3.ogg",1,1,20}; + titles[] = {}; + }; class z_radzone1_0 { name = ""; sound[] = {"\dayz_sfx\effects\geiger_level_0.ogg",1,1,10}; diff --git a/SQF/dayz_sfx/effects/action_attach_0.ogg b/SQF/dayz_sfx/effects/action_attach_0.ogg new file mode 100644 index 000000000..bf0e73bdb Binary files /dev/null and b/SQF/dayz_sfx/effects/action_attach_0.ogg differ diff --git a/SQF/dayz_sfx/effects/action_attach_1.ogg b/SQF/dayz_sfx/effects/action_attach_1.ogg new file mode 100644 index 000000000..3f750f039 Binary files /dev/null and b/SQF/dayz_sfx/effects/action_attach_1.ogg differ diff --git a/SQF/dayz_sfx/effects/action_detach_0.ogg b/SQF/dayz_sfx/effects/action_detach_0.ogg new file mode 100644 index 000000000..8f4e5f8d3 Binary files /dev/null and b/SQF/dayz_sfx/effects/action_detach_0.ogg differ diff --git a/SQF/dayz_sfx/effects/action_detach_1.ogg b/SQF/dayz_sfx/effects/action_detach_1.ogg new file mode 100644 index 000000000..a57d0cfa0 Binary files /dev/null and b/SQF/dayz_sfx/effects/action_detach_1.ogg differ diff --git a/SQF/dayz_sfx/effects/bandage_01.ogg b/SQF/dayz_sfx/effects/bandage_1.ogg similarity index 100% rename from SQF/dayz_sfx/effects/bandage_01.ogg rename to SQF/dayz_sfx/effects/bandage_1.ogg diff --git a/SQF/dayz_sfx/effects/bandage_02.ogg b/SQF/dayz_sfx/effects/bandage_2.ogg similarity index 100% rename from SQF/dayz_sfx/effects/bandage_02.ogg rename to SQF/dayz_sfx/effects/bandage_2.ogg diff --git a/SQF/dayz_sfx/effects/painkiller_01.ogg b/SQF/dayz_sfx/effects/painkiller_0.ogg similarity index 100% rename from SQF/dayz_sfx/effects/painkiller_01.ogg rename to SQF/dayz_sfx/effects/painkiller_0.ogg diff --git a/SQF/dayz_sfx/effects/painkiller_02.ogg b/SQF/dayz_sfx/effects/painkiller_1.ogg similarity index 100% rename from SQF/dayz_sfx/effects/painkiller_02.ogg rename to SQF/dayz_sfx/effects/painkiller_1.ogg diff --git a/SQF/dayz_sfx/effects/painkiller_03.ogg b/SQF/dayz_sfx/effects/painkiller_2.ogg similarity index 100% rename from SQF/dayz_sfx/effects/painkiller_03.ogg rename to SQF/dayz_sfx/effects/painkiller_2.ogg diff --git a/SQF/dayz_sfx/effects/painkiller_04.ogg b/SQF/dayz_sfx/effects/painkiller_3.ogg similarity index 100% rename from SQF/dayz_sfx/effects/painkiller_04.ogg rename to SQF/dayz_sfx/effects/painkiller_3.ogg