mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-15 04:23:13 +03:00
0.69 + 1.7.5.M1D15
This commit is contained in:
@@ -8,10 +8,10 @@ _originalPos = getPosATL _obj;
|
||||
if (_canLoot) then {
|
||||
//Get zombie class
|
||||
_unitTypes = getArray (_config >> "zombieClass");
|
||||
_min = getNumber (_config >> "maxRoaming");
|
||||
_max = getNumber (_config >> "minRoaming");
|
||||
_min = getNumber (_config >> "minRoaming");
|
||||
_max = getNumber (_config >> "maxRoaming");
|
||||
//Walking Zombies
|
||||
_num = round(random _max) max _min;
|
||||
_num = round(random _max) min _min;
|
||||
_config = configFile >> "CfgBuildingLoot" >> _type;
|
||||
//Get zombie class
|
||||
_zombieChance = getNumber (_config >> "zombieChance");
|
||||
|
||||
@@ -182,7 +182,7 @@ if (_hasPatient and !r_drag_sqf and !r_action and !_inVehicle and !r_player_unco
|
||||
|
||||
if ((isPlayer _unit) and !(_charID in _friendlies)) then {
|
||||
r_action = true;
|
||||
_action = _unit addAction ["Tag as friendly", "\z\addons\dayz_code\actions\player_tagFriendly.sqf", [], 0, false, true, "", "_target != player"];
|
||||
_action = _unit addAction ["Tag as friendly", "\z\addons\dayz_code\actions\player_tagFriendly.sqf", [], 0, false, true, "", "vehicle _unit == _unit"];
|
||||
r_player_actions set [count r_player_actions,_action];
|
||||
};
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ _sourceZombie = _source isKindOf "zZombie_base";
|
||||
if (_isPlayer) then {
|
||||
if (_damage > 0.1) then {
|
||||
dayz_canDisconnect = false;
|
||||
dayzDiscoAdd = getPlayerUID player;
|
||||
publicVariable "dayzDiscoAdd";
|
||||
["dayzDiscoAdd",getPlayerUID player] call callRpcProcedure;
|
||||
|
||||
dayz_damageCounter = time;
|
||||
|
||||
//Ensure Control is visible
|
||||
@@ -56,10 +56,7 @@ if (_unit == player) then {
|
||||
_myKills = 200 - (((player getVariable ["humanKills",0]) / 30) * 100);
|
||||
//Process Morality Hit
|
||||
_humanityHit = -(_myKills * _damage);
|
||||
_id = [_source,_humanityHit] spawn {
|
||||
dayzHumanity = [_this select 0,_this select 1,30];
|
||||
publicVariable "dayzHumanity";
|
||||
};
|
||||
["dayzHumanity",[_source,_humanityHit,30]] call broadcastRpcCallAll;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -169,9 +166,7 @@ if (_damage > 0.4) then { //0.25
|
||||
if(!_isPZombie) then {
|
||||
//Create Wound
|
||||
_unit setVariable[_wound,true,true];
|
||||
[_unit,_wound,_hit] spawn fnc_usec_damageBleed;
|
||||
usecBleed = [_unit,_wound,_hit];
|
||||
publicVariable "usecBleed";
|
||||
["usecBleed",[_unit,_wound,_hit]] call broadcastRpcCallAll;
|
||||
|
||||
//Set Injured if not already
|
||||
_isInjured = _unit getVariable["USEC_injured",false];
|
||||
|
||||
@@ -16,6 +16,7 @@ _hasFuelE = "ItemJerrycanEmpty" in magazines player;
|
||||
_hasRawMeat = "FoodSteakRaw" in magazines player;
|
||||
_hasKnife = "ItemKnife" in items player;
|
||||
_hasToolbox = "ItemToolbox" in items player;
|
||||
_hasstatsenabled = player getVariable ["StatsEnabled",false];
|
||||
//_hasTent = "ItemTent" in items player;
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
_nearLight = nearestObject [player,"LitObject"];
|
||||
@@ -28,6 +29,14 @@ if (!isNull _nearLight) then {
|
||||
};
|
||||
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
|
||||
|
||||
if (!_hasstatsenabled) then {
|
||||
if (s_player_stats < 0) then {
|
||||
// s_player_stats = player addAction [format[localize "str_actions_stats",_text], "\z\addons\dayz_code\actions\playerstats.sqf"];
|
||||
(findDisplay 46) displayAddEventHandler ["keyDown", "_this call fnc_onKeyDown"];
|
||||
s_player_stats = 1;
|
||||
};
|
||||
};
|
||||
|
||||
//Grab Flare
|
||||
if (_canPickLight and !dayz_hasLight) then {
|
||||
if (s_player_grabflare < 0) then {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private["_unit","_selection","_strH","_dam","_total"];
|
||||
private["_unit","_selection","_strH","_damage","_total"];
|
||||
_unit = _this select 0;
|
||||
_selection = _this select 1;
|
||||
_damage = _this select 2;
|
||||
@@ -9,15 +9,8 @@ if (_selection != "" and local _unit) then {
|
||||
//player sidechat str _damage;
|
||||
_unit setVariable [_strH,_damage,true];
|
||||
if (_damage == 0) then {
|
||||
dayzUpdateVehicle = [_unit,"repair"];
|
||||
["dayzUpdateVehicle",[_unit,"repair"]] call callRpcProcedure;
|
||||
} else {
|
||||
dayzUpdateVehicle = [_unit,"damage"];
|
||||
};
|
||||
if (isServer) then {
|
||||
if (allowConnection) then {
|
||||
dayzUpdateVehicle call server_updateObject;
|
||||
};
|
||||
} else {
|
||||
publicVariable "dayzUpdateVehicle";
|
||||
["dayzUpdateVehicle",[_unit,"damage"]] call callRpcProcedure;
|
||||
};
|
||||
};
|
||||
@@ -1,4 +1,4 @@
|
||||
private["_unit","_selection","_strH","_dam","_total"];
|
||||
private["_unit","_selection","_damage","_strH","_dam","_total"];
|
||||
_unit = _this select 0;
|
||||
_selection = _this select 1;
|
||||
_damage = _this select 2;
|
||||
@@ -12,14 +12,7 @@ if ((_selection != "") and local _unit) then {
|
||||
_unit setVariable [_strH,_total,true];
|
||||
|
||||
if (_damage >= 1) then {
|
||||
dayzUpdateVehicle = [_unit,"damage"];
|
||||
if (isServer) then {
|
||||
if (allowConnection) then {
|
||||
dayzUpdateVehicle call server_updateObject;
|
||||
};
|
||||
} else {
|
||||
publicVariable "dayzUpdateVehicle";
|
||||
};
|
||||
["dayzUpdateVehicle",[_unit,"damage"]] call callRpcProcedure;
|
||||
};
|
||||
|
||||
} else {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private["_unit","_selection","_strH","_dam","_total"];
|
||||
private["_unit","_killer","_type","_pos","_dir"];
|
||||
_unit = _this select 0;
|
||||
_killer = _this select 1;
|
||||
_type = typeOf _unit;
|
||||
@@ -6,5 +6,4 @@ _pos = getposATL _unit;
|
||||
_dir = direction _unit;
|
||||
if (local _unit) then {
|
||||
deleteVehicle _unit;
|
||||
// [_type,_pos,_dir] spawn object_spawnDamVehicle;
|
||||
};
|
||||
|
||||
@@ -13,11 +13,7 @@ if (r_player_infected) then {
|
||||
};
|
||||
|
||||
//Send Death Notice
|
||||
dayzDeath = [dayz_characterID,0,_body,_playerID,dayz_playerName,_infected];
|
||||
publicVariableServer "dayzDeath";
|
||||
if (isServer) then {
|
||||
_id = dayzDeath spawn server_playerDied;
|
||||
};
|
||||
["dayzDeath",[dayz_characterID,0,_body,_playerID,dayz_playerName,_infected]] call callRpcProcedure;
|
||||
|
||||
_id = [player,50,true,getPosATL player] spawn player_alertZombies;
|
||||
|
||||
@@ -66,8 +62,7 @@ if (count _array > 0) then {
|
||||
_wait = 0;
|
||||
};
|
||||
if (!_canHitFree and !_isBandit) then {
|
||||
dayzHumanity = [_source,_humanity,_wait];
|
||||
publicVariable "dayzHumanity";
|
||||
["dayzHumanity",[_source,_humanity,_wait]] call broadcastRpcCallAll;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -124,10 +119,7 @@ if (count _array > 0) then {
|
||||
|
||||
_body setVariable["combattimeout", 0, true];
|
||||
|
||||
/*
|
||||
dayzFlies = player;
|
||||
publicVariable "dayzFlies";
|
||||
*/
|
||||
//["dayzFlies",player] call broadcastRpcCallAll;
|
||||
sleep 2;
|
||||
|
||||
1 cutRsc ["DeathScreen","BLACK OUT",3];
|
||||
|
||||
@@ -60,16 +60,14 @@ if (_ammo isKindOf "SmokeShell") then {
|
||||
if (_ammo isKindOf "RoadFlare") then {
|
||||
//hint str(_ammo);
|
||||
_projectile = nearestObject [_unit, "RoadFlare"];
|
||||
_id = [_projectile,0] spawn object_roadFlare;
|
||||
dayzRoadFlare = [_projectile,0];
|
||||
publicVariable "dayzRoadFlare";
|
||||
["dayzRoadFlare",[_projectile,0]] call broadcastRpcCallAll;
|
||||
|
||||
_id = _this spawn player_throwObject;
|
||||
};
|
||||
if (_ammo isKindOf "ChemLight") then {
|
||||
_projectile = nearestObject [_unit, "ChemLight"];
|
||||
_id = [_projectile,1] spawn object_roadFlare;
|
||||
dayzRoadFlare = [_projectile,1];
|
||||
publicVariable "dayzRoadFlare";
|
||||
["dayzRoadFlare",[_projectile,1]] call broadcastRpcCallAll;
|
||||
|
||||
_id = _this spawn player_throwObject;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
private ["_objects"];
|
||||
_objects = nearestObjects [getPosATL player, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage"], 10];
|
||||
{
|
||||
dayzUpdateVehicle = [_x,"gear"];
|
||||
publicVariableServer "dayzUpdateVehicle";
|
||||
["dayzUpdateVehicle",[_x,"gear"]] call callRpcProcedure;
|
||||
} foreach _objects;
|
||||
|
||||
private["_dialog","_magazineArray","_control","_item","_val","_max"];
|
||||
|
||||
@@ -46,9 +46,7 @@ if (count _medical > 0) then {
|
||||
//Add Wounds
|
||||
{
|
||||
player setVariable[_x,true,true];
|
||||
[player,_x,_hit] spawn fnc_usec_damageBleed;
|
||||
usecBleed = [player,_x,0];
|
||||
publicVariable "usecBleed";
|
||||
["usecBleed",[player,_x,_hit]] call broadcastRpcCallAll;
|
||||
} forEach (_medical select 8);
|
||||
|
||||
//Add fractures
|
||||
@@ -77,11 +75,8 @@ player setVariable["worldspace",_worldspace,true];
|
||||
player setVariable["friendlies",_friendlies,true];
|
||||
player setVariable["tagList",_tagList,true];
|
||||
|
||||
dayzPlayerMorph = [_charID,player,_playerUID,[_zombieKills,_headShots,_humanKills,_banditKills],_humanity];
|
||||
publicVariable "dayzPlayerMorph";
|
||||
if (isServer) then {
|
||||
dayzPlayerMorph call server_playerMorph;
|
||||
};
|
||||
//code for this on the server is missing
|
||||
//["dayzPlayerMorph",[_charID,player,_playerUID,[_zombieKills,_headShots,_humanKills,_banditKills],_humanity]] call callRpcProcedure;
|
||||
|
||||
call dayz_resetSelfActions;
|
||||
|
||||
|
||||
@@ -34,12 +34,7 @@ if(_ownerID == dayz_characterID) then {
|
||||
_magazines = getMagazineCargo _obj;
|
||||
_backpacks = getBackpackCargo _obj;
|
||||
|
||||
dayzDeleteObj = [_objectID,_objectUID];
|
||||
publicVariableServer "dayzDeleteObj";
|
||||
if (isServer) then {
|
||||
dayzDeleteObj call local_deleteObj;
|
||||
};
|
||||
|
||||
["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
|
||||
deleteVehicle _obj;
|
||||
|
||||
//Add weapons
|
||||
|
||||
@@ -34,11 +34,7 @@ if(_ownerID == dayz_playerUID) then {
|
||||
_magazines = getMagazineCargo _obj;
|
||||
_backpacks = getBackpackCargo _obj;
|
||||
|
||||
dayzDeleteObj = [_objectID,_objectUID];
|
||||
publicVariableServer "dayzDeleteObj";
|
||||
if (isServer) then {
|
||||
dayzDeleteObj call local_deleteObj;
|
||||
};
|
||||
["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
|
||||
|
||||
deleteVehicle _obj;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ _dateNow = (DateToNumber date);
|
||||
_maxZombies = dayz_maxLocalZombies;
|
||||
_maxWildZombies = 3;
|
||||
_age = -1;
|
||||
|
||||
_nearbyBuildings = [];
|
||||
_radius = 200;
|
||||
_maxZombies = 10;
|
||||
@@ -23,20 +24,37 @@ diag_log ("Type: " +str(_type));
|
||||
|
||||
switch (_nearbytype) do {
|
||||
case "NameVillage": {
|
||||
_radius = 250;
|
||||
//_radius = 250;
|
||||
_maxZombies = 30;
|
||||
};
|
||||
case "NameCity": {
|
||||
_radius = 300;
|
||||
//_radius = 300;
|
||||
_maxZombies = 40;
|
||||
};
|
||||
case "NameCityCapital": {
|
||||
_radius = 400;
|
||||
//_radius = 400;
|
||||
_maxZombies = 50;
|
||||
};
|
||||
};
|
||||
|
||||
_spawnZombies = count (_position nearEntities ["zZombie_Base",_radius]) < _maxZombies;
|
||||
_spawnZombies = count (_position nearEntities ["zZombie_Base",_radius+100]) < _maxZombies;
|
||||
|
||||
if ("ItemMap_Debug" in items player) then {
|
||||
deleteMarkerLocal "MaxZeds";
|
||||
deleteMarkerLocal "Counter";
|
||||
_markerstr = createMarkerLocal ["MaxZeds", _position];
|
||||
_markerstr setMarkerColorLocal "ColorRed";
|
||||
_markerstr setMarkerShapeLocal "ELLIPSE";
|
||||
_markerstr setMarkerBrushLocal "Border";
|
||||
_markerstr setMarkerSizeLocal [_radius, _radius];
|
||||
|
||||
_markerstr1 = createMarkerLocal ["Counter", _position];
|
||||
_markerstr1 setMarkerColorLocal "ColorYellow";
|
||||
_markerstr1 setMarkerShapeLocal "ELLIPSE";
|
||||
_markerstr1 setMarkerBrushLocal "Border";
|
||||
_markerstr1 setMarkerSizeLocal [_radius+100, _radius+100];
|
||||
};
|
||||
|
||||
|
||||
switch (_type) do {
|
||||
case "Zeds": {
|
||||
@@ -49,8 +67,16 @@ switch (_type) do {
|
||||
};
|
||||
};
|
||||
};
|
||||
case "Wild": {
|
||||
case "both": {
|
||||
//[_position, _maxZombies] call wild_spawnZombies;
|
||||
_nearbyBuildings = nearestObjects [_position, dayz_ZombieBuildings, _radius];
|
||||
_nearbyCount = count _nearbyBuildings;
|
||||
if (_nearbyCount > 0) then {
|
||||
[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _nearbyBuildings] call player_spawnlootCheck;
|
||||
if (_spawnZombies) then {
|
||||
[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _maxZombies, _nearbyBuildings] call player_spawnzedCheck;
|
||||
};
|
||||
};
|
||||
};
|
||||
case "Loot": {
|
||||
//_nearbyBuildings = nearestObjects [_position, ["building"], _radius];
|
||||
|
||||
@@ -189,5 +189,5 @@ private ["_newBackpackType","_backpackWpn","_backpackMag"];
|
||||
|
||||
_playerUID=getPlayerUID player;
|
||||
_playerObjName = format["player%1",_playerUID];
|
||||
call compile format["player%1 = player;",_playerUID];
|
||||
call compile format["%1 = player;",_playerObjName];
|
||||
publicVariable _playerObjName;
|
||||
@@ -1,4 +1,4 @@
|
||||
private["_unit","_targets","_move","_damage","_wound","_index","_cnt","_sound","_local","_dir","_hpList","_hp","_strH","_dam","_total","_result","_vehicle","_tPos","_zPos","_cantSee","_inAngle"];
|
||||
private["_unit","_targets","_move","_damage","_wound","_index","_cnt","_sound","_local","_dir","_hpList","_hp","_strH","_dam","_total","_vehicle","_tPos","_zPos","_cantSee","_inAngle"];
|
||||
_unit = _this select 0;
|
||||
_type = _this select 1;
|
||||
_vehicle = (vehicle player);
|
||||
@@ -40,9 +40,7 @@ if (_vehicle != player) then {
|
||||
|
||||
//diag_log ("Hitpoints " +str(_wound) +str(_total));
|
||||
|
||||
//_result = [_vehicle, _wound,_total, _unit,"zombie"] call fnc_usec_damageVehicle;
|
||||
//dayzHitV = [_vehicle,_wound,_total, _unit,"zombie"];
|
||||
//publicVariable "dayzHitV";
|
||||
//["dayzHitV",[_vehicle, _wound,_total, _unit,"zombie"]] call broadcastRpcCallAll;
|
||||
if (_total >= 1) then {
|
||||
if ((_chance % 4) == 0) then {
|
||||
if ((_vehicle isKindOf "ATV_Base_EP1") or (_vehicle isKindOf "Motorcycle")) then { player action ["eject", _vehicle] };
|
||||
@@ -65,9 +63,7 @@ if (_vehicle != player) then {
|
||||
//publicVariable "dayzHit";
|
||||
[_unit,"hit",2,true] call dayz_zombieSpeak;
|
||||
} else {
|
||||
_result = [_vehicle, _wound,_total, _unit,"zombie"] call fnc_usec_damageVehicle;
|
||||
dayzHitV = [_vehicle,_wound,_total, _unit,"zombie"];
|
||||
publicVariable "dayzHitV";
|
||||
["dayzHitV",[_vehicle, _wound,_total, _unit,"zombie"]] call broadcastRpcCallAll;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
|
||||
@@ -31,7 +31,6 @@ _multiplier = 1;
|
||||
_delta = _pHeight - _entHeight;
|
||||
if ( ((time - _last) > 1) and ((_delta < 1.5) and (_delta > -1.5)) ) then {
|
||||
zedattack = [_x, _type] spawn player_zombieAttack;
|
||||
waitUntil {scriptDone zedattack};
|
||||
_x setVariable["lastAttack",time];
|
||||
};
|
||||
_attacked = true;
|
||||
|
||||
@@ -23,14 +23,7 @@ if (_dam < 1 ) then {
|
||||
_unit setVariable [_strH,_total,true];
|
||||
if ( !_needUpdate ) then {
|
||||
_unit setVariable ["needUpdate",true,true];
|
||||
dayzUpdateVehicle = [_unit,"damage"];
|
||||
if (isServer) then {
|
||||
if (allowConnection) then {
|
||||
dayzUpdateVehicle call server_updateObject;
|
||||
};
|
||||
} else {
|
||||
publicVariableServer "dayzUpdateVehicle";
|
||||
};
|
||||
["dayzUpdateVehicle",[_unit,"damage"]] call callRpcProcedure;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private["_unit","_selection","_killer"];
|
||||
private["_unit","_hitPoints","_selection","_killer"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_killer = _this select 1;
|
||||
@@ -9,15 +9,7 @@ _hitPoints = _unit call vehicle_getHitpoints;
|
||||
_unit setVariable [_selection, 1, true];
|
||||
} forEach _hitPoints;
|
||||
|
||||
dayzUpdateVehicle = [_unit, "damage", true];
|
||||
|
||||
if (isServer) then {
|
||||
if (allowConnection) then {
|
||||
dayzUpdateVehicle call server_updateObject;
|
||||
};
|
||||
} else {
|
||||
publicVariable "dayzUpdateVehicle";
|
||||
};
|
||||
["dayzUpdateVehicle",[_unit, "damage", true]] call callRpcProcedure;
|
||||
|
||||
_unit removeAllEventHandlers "HandleDamage";
|
||||
_unit removeAllEventHandlers "Killed";
|
||||
|
||||
@@ -63,7 +63,6 @@ if (_doLoiter) then {
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
if (isNull _agent) exitWith {
|
||||
dayz_spawnZombies = dayz_spawnZombies - 1;
|
||||
};
|
||||
@@ -83,6 +82,7 @@ if (_rnd > 0.3) then {
|
||||
_array = []+ getArray (configFile >> "cfgLoot" >> getText(_lootType));
|
||||
if (count _array > 0) then {
|
||||
_loot = _array call BIS_fnc_selectRandomWeighted;
|
||||
//diag_log ("Zed Loot: " +(_loot));
|
||||
if(!isNil "_array") then {
|
||||
_agent addMagazine _loot;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user