mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-17 17:20:26 +03:00
0.95
+ work around added to player zombie "get over" stuck animation issue. + added setpos to vaults, allows precise positioning + possible fix for damage spam at server start. + added player zombie attack move, Works with animals and zombies only currently. + 10oz bars for all types of metal + fix for detecting near vehicles when selling fixes #81
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
private["_hasKnife","_qty","_item","_text","_string","_type","_loop","_meat","_timer"];
|
||||
private ["_item","_id"];
|
||||
_item = _this select 3;
|
||||
|
||||
// remove menu
|
||||
@@ -12,10 +12,10 @@ s_player_callzombies = 1;
|
||||
|
||||
[player,"spotted",0,false] call dayz_zombieSpeak;
|
||||
|
||||
_id = [player,100,true,(getPosATL player)] spawn player_alertZombies;
|
||||
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
// wait a bit
|
||||
sleep 6;
|
||||
sleep 15;
|
||||
|
||||
// allow menu again
|
||||
s_player_callzombies = -1;
|
||||
|
||||
@@ -79,6 +79,49 @@ if (inflamed cursorTarget and _canDo) then {
|
||||
[ ["ItemGoldBar",10] ],
|
||||
[ ["ItemGoldBar10oz",1] ]
|
||||
];
|
||||
|
||||
_recipe_ItemSilverBar10oz = [
|
||||
[ ["ItemSilverBar10oz",1] ],
|
||||
[ ["ItemSilverBar",10] ]
|
||||
];
|
||||
|
||||
_recipe_ItemSilverBar = [
|
||||
[ ["ItemSilverBar",10] ],
|
||||
[ ["ItemSilverBar10oz",1] ]
|
||||
];
|
||||
|
||||
_recipe_ItemCopperBar10oz = [
|
||||
[ ["ItemCopperBar10oz",1] ],
|
||||
[ ["ItemCopperBar",10] ]
|
||||
];
|
||||
|
||||
_recipe_ItemCopperBar = [
|
||||
[ ["ItemCopperBar",10] ],
|
||||
[ ["ItemCopperBar10oz",1] ]
|
||||
];
|
||||
|
||||
_recipe_ItemTinBar10oz = [
|
||||
[ ["ItemTinBar10oz",1] ],
|
||||
[ ["ItemTinBar",10] ]
|
||||
];
|
||||
|
||||
_recipe_ItemTinBar = [
|
||||
[ ["ItemTinBar",10] ],
|
||||
[ ["ItemTinBar10oz",1] ]
|
||||
];
|
||||
|
||||
_recipe_ItemAluminumBar10oz = [
|
||||
[ ["ItemAluminumBar10oz",1] ],
|
||||
[ ["ItemAluminumBar",10] ]
|
||||
];
|
||||
|
||||
_recipe_ItemAluminumBar = [
|
||||
[ ["ItemAluminumBar",10] ],
|
||||
[ ["ItemAluminumBar10oz",1] ]
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
_recipe_FoodChickenNoodle = [["FoodchickenRaw",1],["FoodCanPasta",1],["ItemWaterbottle",1]];
|
||||
_recipe_FoodBeefBakedBeans = [["FoodbeefRaw",1],["FoodCanBakedBeans",1]];
|
||||
|
||||
44
dayz_code/actions/pzombie/pz_attack.sqf
Normal file
44
dayz_code/actions/pzombie/pz_attack.sqf
Normal file
@@ -0,0 +1,44 @@
|
||||
private ["_item","_ent","_cnt","_index","_wound","_damage","_rnd","_move"];
|
||||
_item = _this select 3;
|
||||
_ent = _item;
|
||||
|
||||
// remove menu
|
||||
player removeAction s_player_pzombiesattack;
|
||||
s_player_pzombiesattack = 1;
|
||||
|
||||
_rnd = round(random 9) + 1;
|
||||
_move = "ZombieStandingAttack" + str(_rnd);
|
||||
player playMoveNow _move;
|
||||
|
||||
sleep 1;
|
||||
|
||||
_isZombie = _ent isKindOf "zZombie_base";
|
||||
|
||||
// TODO add distance check and maybe los
|
||||
|
||||
if (_ent isKindOf "Animal" or _isZombie) then {
|
||||
_ent setDamage 1;
|
||||
} else {
|
||||
|
||||
// TODO TEST AND Improve
|
||||
_cnt = count (DAYZ_woundHit select 1);
|
||||
_index = floor (random _cnt);
|
||||
_index = (DAYZ_woundHit select 1) select _index;
|
||||
_wound = (DAYZ_woundHit select 0) select _index;
|
||||
|
||||
_damage = 0.1 + random (1.2);
|
||||
|
||||
[_item, _wound, _damage, player,"zombie"] call fnc_usec_damageHandler;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
[player,"hit",0,false] call dayz_zombieSpeak;
|
||||
|
||||
|
||||
player switchmove "";
|
||||
|
||||
sleep 1;
|
||||
|
||||
s_player_pzombiesattack = -1;
|
||||
@@ -1,25 +1,19 @@
|
||||
private["_item","_id","_regen","_isAnimal","_animalType","_isMan","_config","_isListed","_qty","_ent"];
|
||||
private ["_item","_id","_regen","_isAnimal","_animalType","_isMan","_config","_isListed","_qty","_ent","_ctrlBlood","_rnd","_move","_display","_control","_bloodVal"];
|
||||
_item = _this select 3;
|
||||
_ent = _item;
|
||||
|
||||
disableSerialization;
|
||||
|
||||
player removeAction s_player_butcher;
|
||||
s_player_butcher = 1;
|
||||
|
||||
if (_ent isKindOf "Animal") then {
|
||||
_ent setDamage 1;
|
||||
} else {
|
||||
_ent setHit ["legs",1];
|
||||
_ent setVariable ["hit_legs",2,true];
|
||||
};
|
||||
if(!(alive _item)) then {
|
||||
|
||||
_rnd = round(random 4) + 1;
|
||||
_move = "ZombieFeed" + str(_rnd);
|
||||
|
||||
[nil, player, rSWITCHMOVE,_move] call RE;
|
||||
|
||||
sleep 5;
|
||||
|
||||
if(not alive _item) then {
|
||||
_rnd = round(random 4) + 1;
|
||||
_move = "ZombieFeed" + str(_rnd);
|
||||
player playMoveNow _move;
|
||||
|
||||
sleep 1;
|
||||
|
||||
// player playActionNow "PutDown";
|
||||
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
|
||||
@@ -91,8 +85,10 @@ if(not alive _item) then {
|
||||
_control ctrlShow true;
|
||||
|
||||
|
||||
cutText [format[(localize "str_player_consumed"),_item, "PLAIN DOWN"];
|
||||
|
||||
cutText [format[(localize "str_player_consumed"),_animalType], "PLAIN DOWN"];
|
||||
player switchmove "";
|
||||
};
|
||||
|
||||
|
||||
|
||||
s_player_butcher = -1;
|
||||
@@ -91,7 +91,7 @@ diag_log format["DEBUG Buy: %1", dayzTraderMenuResult];
|
||||
|
||||
_count = 0;
|
||||
if(_stype == "CfgVehicles") then {
|
||||
_count = position player nearObjects [_name,10];
|
||||
_count = count (position player nearObjects [_name,10]);
|
||||
};
|
||||
if(_stype == "CfgMagazines") then {
|
||||
_count = {_x == _name} count magazines player;
|
||||
|
||||
@@ -52,8 +52,9 @@ if(_isPZombie) then {
|
||||
//hint str(_state);
|
||||
if (s_player_callzombies < 0) then {
|
||||
s_player_callzombies = player addAction ["Raise Horde", "\z\addons\dayz_code\actions\call_zombies.sqf",player, 5, true, false, "",""];
|
||||
//s_player_callzombies1 = player addAction ["Zombie Vison", "\z\addons\dayz_code\actions\vison_zombie.sqf",player, 4, true, false, "",""];
|
||||
|
||||
};
|
||||
if (s_player_pzombiesattack < 0) then {
|
||||
s_player_pzombiesattack = player addAction ["Attack", "\z\addons\dayz_code\actions\pzombie\pz_attack.sqf",cursorTarget, 6, true, false, "",""];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -150,7 +151,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 6))
|
||||
|
||||
if(_isPZombie) then {
|
||||
// Pzombie Gut human corpse or animal
|
||||
if ((_isAnimal or _isMan) and !_isHarvested and _canDo) then {
|
||||
if (!alive cursorTarget and (_isAnimal or _isMan) and !_isZombie and !_isHarvested and _canDo) then {
|
||||
if (s_player_butcher < 0) then {
|
||||
s_player_butcher = player addAction ["Feed", "\z\addons\dayz_code\actions\pzombie\pz_feed.sqf",cursorTarget, 3, true, false, "",""];
|
||||
};
|
||||
|
||||
@@ -225,12 +225,21 @@ if (!isDedicated) then {
|
||||
_dikCode = _this select 1;
|
||||
_handled = false;
|
||||
if (_dikCode in (actionKeys "GetOver")) then {
|
||||
|
||||
if (player isKindOf "PZombie_VB") exitWith {
|
||||
//player action ["sitDown", player];
|
||||
player switchAction "sitDown";
|
||||
//player playMoveNow "ZombieStandingAttack1";
|
||||
//player switchMove "AmovPercMstpSnonWnonDnon";
|
||||
diag_log "Saved player zombie from animation lockup?";
|
||||
};
|
||||
|
||||
DoRE = ({isPlayer _x} count (player nearEntities ["AllVehicles",500]) > 1);
|
||||
if (canRoll && animationState player in ["amovpercmrunslowwrfldf","amovpercmrunsraswrfldf","amovpercmevaslowwrfldf","amovpercmevasraswrfldf"]) then {
|
||||
canRoll = false;
|
||||
null = [] spawn {
|
||||
if (DoRE) then {
|
||||
[nil, player, rSWITCHMOVE,"ActsPercMrunSlowWrflDf_FlipFlopPara"] call RE;
|
||||
[nil, player, rSWITCHMOVE,"ActsPercMrunSlowWrflDf_FlipFlopPara"] call RE;
|
||||
} else {
|
||||
player switchMove "ActsPercMrunSlowWrflDf_FlipFlopPara";
|
||||
};
|
||||
|
||||
@@ -106,6 +106,7 @@ dayz_resetSelfActions = {
|
||||
s_player_fillfuel = -1;
|
||||
s_player_grabflare = -1;
|
||||
s_player_callzombies = -1;
|
||||
s_player_pzombiesattack = -1;
|
||||
s_player_removeflare = -1;
|
||||
s_player_painkiller = -1;
|
||||
s_player_studybody = -1;
|
||||
|
||||
@@ -6,7 +6,7 @@ fnc_usec_damageHandle = {
|
||||
************************************************************/
|
||||
private["_unit","_eh"];
|
||||
_unit = _this select 0;
|
||||
mydamage_eh1 = _unit addeventhandler ["HandleDamage",{_this call fnc_usec_damageHandler;0} ];
|
||||
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;}];
|
||||
};
|
||||
|
||||
@@ -545,7 +545,7 @@ class FSM
|
||||
"selectNoPlayer;" \n
|
||||
"" \n
|
||||
"_myTime = time;" \n
|
||||
"1 cutText [""This server is running an incorrect version of the server side application. You cannot play on this server. If you are the server admin please contact DayZepoch.com staff."", ""PLAIN"",5];"/*%FSM</STATEINIT""">*/;
|
||||
"1 cutText [""This server is running an incorrect version of the server side application. If this is the first time you have seen this error please reconnect. If you are the server admin please contact DayZepoch.com staff."", ""PLAIN"",5];"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user