mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-20 02:16:29 +03:00
+ [FIXED] Prevent player zombies from getting any default loadouts. + [FIXED] Bad vehicle type message when using default loadout override and no backpack. + [FIXED] dayz_zedsAttackVehicles logic was reversed fixed now so that true = attack vehicles. + [ADDED] Safes now have a keypad GUI. Simply click on the numbers to enter your combo and then press #. https://www.dropbox.com/s/b00fgdpo13wokg9/Untitled-1.jpg + [ADDED] Tons of awesome cars by vilas from http://www.armaholic.com/page.php?id=17447 + [FIXED] Models needed extra variable to prevent being sunk into the ground. + [CHANGED] Bleeding duration reduced to minimum of 30 sec and max of 330 seconds. Before it was min 100 max 500. + [ADDED] When kneeling bleeding per second is reduced by 50%. + [ADDED] When crawling bleeding per second is reduced by 75%. + [ADDED] When changing locations the locations name will display in the bottom right. + [CHANGED] Replaced m107 with BAF_LRR_scoped. + [CHANGED] Replaced as50 with AK_107_PSO. TODO + [FIXED] Lock vehicle no longer shows on killed vehicles. + [ADDED] Disabled purchased vehicle parachute spawning by default added variable DZE_TRADER_SPAWNMODE = true; to enable. (Default: false) + [CHANGED] Plot pole has changed to another model a "no entry" sign and can be removed by anyone. When done building take your plot pole with you, if it isn't yours remove it and put it back down again. + [ADDED] Loot positions on top of some tables. + [ADDED] Briefcase that can hold up to 10 x 10oz Gold Bars or 100oz. + [ADDED] Full moon nights as option with dayz_fullMoonNights = true; + [CHANGED] Can no longer Salvage vehicle parts with 0 damage. Fixes bugged hitpoints and duping. + [REMOVED] Remove all crates of toolbelt items. This was just to add stock to traders and since most servers are now auto stocking them at the traders its not needed and cumbersome to use. + [CHANGED] Generator can only be built within 30m of gas stations that say "Needs Power". + [CHANGED] Moved light bulb to farm loot table as it was to common on trash loots. + [ADDED] Fuel pump can be built near standard fuel source (i.e. rusty tanks) then powered with a generator to make a refuel station. + [CHANGED] R3f realism no more fade to black, changed to use dayz shaking and knockouts. + [ADDED] Reset tiredness when you take painkillers. + [ADDED] Reset tiredness when you sleep at a tent. + [ADDED] added back fixed rbull soda and added new can orange sherbet
128 lines
4.8 KiB
Plaintext
128 lines
4.8 KiB
Plaintext
private ["_unit","_targets","_move","_damage","_wound","_index","_cnt","_dir","_hpList","_hp","_strH","_dam","_total","_vehicle","_tPos","_zPos","_cantSee","_inAngle","_rnd","_openVehicles","_chance","_attackanimations","_type"];
|
|
_unit = _this select 0;
|
|
_type = _this select 1;
|
|
_vehicle = (vehicle player);
|
|
|
|
_targets = _unit getVariable ["targets",[]];
|
|
|
|
// if (!dayz_zedsAttackVehicles and !(_vehicle in _targets)) exitWith {};
|
|
|
|
//Do the attack
|
|
if (r_player_unconscious && _vehicle == player && _type == "zombie") then {
|
|
_rnd = (round(random 4)) + 1;
|
|
_move = "ZombieFeed" + str(_rnd);
|
|
} else {
|
|
if (_type == "zombie") then {
|
|
_rnd = (round(random 9)) + 1;
|
|
_move = "ZombieStandingAttack" + str(_rnd);
|
|
} else {
|
|
_move = "Dog_Attack";
|
|
};
|
|
};
|
|
_dir = [_unit,player] call BIS_Fnc_dirTo;
|
|
_unit setDir _dir;
|
|
_unit playMove _move;
|
|
|
|
//Wait
|
|
sleep 0.3;
|
|
|
|
if (_vehicle != player) then {
|
|
_hpList = _vehicle call vehicle_getHitpoints;
|
|
_hp = _hpList call BIS_fnc_selectRandom;
|
|
_wound = getText(configFile >> "cfgVehicles" >> (typeOf _vehicle) >> "HitPoints" >> _hp >> "name");
|
|
_damage = random 0.08;
|
|
_chance = round(random 12);
|
|
|
|
if ((_chance % 4) == 0) then {
|
|
_openVehicles = ["ATV_Base_EP1", "Motorcycle", "Bicycle"];
|
|
{
|
|
if (_vehicle isKindOf _x) exitWith {
|
|
player action ["eject", _vehicle];
|
|
};
|
|
} forEach _openVehicles;
|
|
};
|
|
|
|
if ((_wound == "Glass1") or (_wound == "Glass2") or (_wound == "Glass3") or (_wound == "Glass4") or (_wound == "Glass5") or (_wound == "Glass6")) then {
|
|
[_unit,"hit",4,false] call dayz_zombieSpeak;
|
|
_strH = "hit_" + (_wound);
|
|
_dam = _vehicle getVariable [_strH,0];
|
|
_total = (_dam + _damage);
|
|
|
|
//diag_log ("Hitpoints " +str(_wound) +str(_total));
|
|
|
|
//["dayzHitV",[_vehicle, _wound,_total, _unit,"zombie"]] call broadcastRpcCallAll;
|
|
if (_total >= 1) then {
|
|
if (r_player_blood < (r_player_bloodTotal * 0.8)) then {
|
|
_cnt = count (DAYZ_woundHit select 1);
|
|
_index = floor (random _cnt);
|
|
_index = (DAYZ_woundHit select 1) select _index;
|
|
_wound = (DAYZ_woundHit select 0) select _index;
|
|
} else {
|
|
_cnt = count (DAYZ_woundHit_ok select 1);
|
|
_index = floor (random _cnt);
|
|
_index = (DAYZ_woundHit_ok select 1) select _index;
|
|
_wound = (DAYZ_woundHit_ok select 0) select _index;
|
|
};
|
|
_damage = 0.1 + random (1.2);
|
|
//diag_log ("START DAM: Player Hit on " + _wound + " for " + str(_damage));
|
|
[player, _wound, _damage, _unit,"zombie"] call fnc_usec_damageHandler;
|
|
//dayzHit = [player,_wound, _damage, _unit,"zombie"];
|
|
//publicVariable "dayzHit";
|
|
[_unit,"hit",2,false] call dayz_zombieSpeak;
|
|
} else {
|
|
//["dayzHitV",[_vehicle, _wound, _total, _unit,"zombie"]] call broadcastRpcCallAll;
|
|
dayzHitV = [_vehicle, _wound, _total, _unit,"zombie"];
|
|
publicVariable "dayzHitV";
|
|
};
|
|
};
|
|
} else {
|
|
//Did he hit?
|
|
//_currentAnim = animationState _unit;
|
|
//diag_log ("Animation state: " +(_currentAnim));
|
|
//"amovpercmstpsnonwnondnon",
|
|
_attackanimations = ["zombiestandingattack1","zombiestandingattack2","zombiestandingattack3","zombiestandingattack4","zombiestandingattack5","zombiestandingattack6","zombiestandingattack7","zombiestandingattack8","zombiestandingattack9","zombiestandingattack10","zombiefeed1","zombiefeed2","zombiefeed3","zombiefeed4","zombiefeed5"];
|
|
if (((_unit distance player) <= 3) and ((animationState _unit) in _attackanimations)) then {
|
|
//check LOS
|
|
private[];
|
|
_tPos = (getPosASL _vehicle);
|
|
_zPos = (getPosASL _unit);
|
|
_inAngle = [_zPos,(getdir _unit),50,_tPos] call fnc_inAngleSector;
|
|
if (_inAngle) then {
|
|
//LOS check
|
|
_cantSee = [_unit,_vehicle] call dayz_losCheck;
|
|
if (!_cantSee) then {
|
|
if (r_player_blood < (r_player_bloodTotal * 0.8)) then {
|
|
_cnt = count (DAYZ_woundHit select 1);
|
|
_index = floor (random _cnt);
|
|
_index = (DAYZ_woundHit select 1) select _index;
|
|
_wound = (DAYZ_woundHit select 0) select _index;
|
|
} else {
|
|
_cnt = count (DAYZ_woundHit_ok select 1);
|
|
_index = floor (random _cnt);
|
|
_index = (DAYZ_woundHit_ok select 1) select _index;
|
|
_wound = (DAYZ_woundHit_ok select 0) select _index;
|
|
};
|
|
_damage = 0.1 + random (1.2);
|
|
|
|
//diag_log ("START DAM: Player Hit on " + _wound + " for " + str(_damage));
|
|
[player, _wound, _damage, _unit,"zombie"] call fnc_usec_damageHandler;
|
|
//dayzHit = [player,_wound, _damage, _unit,"zombie"];
|
|
//publicVariable "dayzHit";
|
|
[_unit,"hit",2,false] call dayz_zombieSpeak;
|
|
} else {
|
|
/*
|
|
_isZombieInside = [_unit,_building] call fnc_isInsideBuilding;
|
|
if (_isPlayerInside) then {
|
|
_damage = 0.1 + random (1.2);
|
|
//diag_log ("START DAM: Player Hit on " + _wound + " for " + str(_damage));
|
|
[player, _wound, _damage, _unit,"zombie"] call fnc_usec_damageHandler;
|
|
//dayzHit = [player,_wound, _damage, _unit,"zombie"];
|
|
//publicVariable "dayzHit";
|
|
[_unit,"hit",2,false] call dayz_zombieSpeak;
|
|
};
|
|
*/
|
|
};
|
|
};
|
|
};
|
|
};
|