mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-17 17:20:26 +03:00
1.0.0.3 Developer Build
+ [FIXED] Battleye kick when calling dog. Thanks to @kikyou2 + [FIXED] Moved vehicle event handler to server side with a call to all connected clients. Before it was just set on only the owner and the server. This should fix issues with damage/repair handling of just purchased vehicles. + [FIXED] Fixed case sensitivity in building loot generation. This was only a problem on new maps that share the same buildings as others yet have differing case in the classnames. + [ADDED] New build-ables: Fence_corrugated_DZ, M240Nest_DZ, CanvasHut_DZ, ParkBench_DZ, MetalGate_DZ, OutHouse_DZ, Wooden_shed_DZ, WoodShack_DZ, StorageShed_DZ. + [ADDED] New crafting items: ItemCanvas, PartWoodLumber, PartWoodPlywood, ItemCorrugated, ItemPole + [ADDED] 55 gallon (210 liter) Fuel Barrel that can only be used on helicopters or fuel trucks. + [ADDED] All DayZ specific magazine items now only take one slot, this also makes it easier to become over burdened so be careful about blacking out. + [ADDED] More building loot spawn positions for Namalsk. + [FIXED] When packing tent get classname of new weapon_holder from config. + [CHANGED] Totally reworked player building system. Preview and placement accuracy has been significantly improved. Building now requires X number of stages to complete. Players cannot build while in combat. + [CHANGED] Added required tools array and is nearby checking for fire, etc. Also, each item can now have 5 separate crafting options. + [CHANGED] Reworked refuel and siphon code to support more can types. + [CHANGED] Removed all infinite fueling sources and added (KamazRefuel_DZ, UralRefuel_TK_EP1_DZ,MtvrRefuel_DES_EP1_DZ) variants of the fuel trucks to remove auto refuel and increase siphon-able fuel capacity to 10000. Old style refuel can still be used if the variable dayz_oldrefuel = true is set in the missions init.sqf. + [CHANGED] Remove object code now uses config variables instead of hard coded into sqf (default: constructioncount = 5) + [CHANGED] Moved most arrays for revealing objects, allowed objects, update objects, disallowed combat roll to arrays within variables.sqf. So that these arrays are unified and easier to change. + [CHANGED] New vehicle spawns now have a new fuel system using a random percent between min and max variables. Defaults: (DynamicVehicleFuelLow = 0; DynamicVehicleFuelHigh = 100;) + [CHANGED] New vehicle spawns now damage all parts and without a limiter on fuel and engine parts, this could cause a vehicle to be very close to blowing up. + [CHANGED] Disabled simulation server side of all road debris and crashes.
This commit is contained in:
@@ -35,7 +35,7 @@ dayz_disco = dayz_disco - [_playerID];
|
||||
if (!isNull _object) then {
|
||||
//Update Vehicle
|
||||
{ [_x,"gear"] call server_updateObject } foreach
|
||||
(nearestObjects [getPosATL _object, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage", "VaultStorage"], 10]);
|
||||
(nearestObjects [getPosATL _object, dayz_updateObjects, 10]);
|
||||
if (alive _object) then {
|
||||
[_object,(magazines _object),true,true] call server_playerSync;
|
||||
//[_object,[],true,false] call server_playerSync;
|
||||
|
||||
@@ -210,7 +210,7 @@ if (_characterID != "0") then {
|
||||
_pos = _this select 0;
|
||||
{
|
||||
[_x, "gear"] call server_updateObject;
|
||||
} forEach nearestObjects [_pos, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage", "VaultStorage"], 10];
|
||||
} forEach nearestObjects [_pos, dayz_updateObjects, 10];
|
||||
//[_charPos] call server_updateNearbyObjects;
|
||||
|
||||
//Reset timer
|
||||
|
||||
@@ -5,11 +5,8 @@ _object = _this select 1;
|
||||
_worldspace = _this select 2;
|
||||
_class = _this select 3;
|
||||
|
||||
if (!(_object isKindOf "Building")) exitWith {
|
||||
deleteVehicle _object;
|
||||
};
|
||||
_allowed = [_object, "Server"] call check_publishobject;
|
||||
if (!_allowed) exitWith { };
|
||||
if (!_allowed) exitWith { deleteVehicle _object; };
|
||||
|
||||
|
||||
//diag_log ("PUBLISH: Attempt " + str(_object));
|
||||
@@ -22,11 +19,11 @@ _key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 ,
|
||||
//diag_log ("HIVE: WRITE: "+ str(_key));
|
||||
_key call server_hiveWrite;
|
||||
|
||||
_object setVariable ["lastUpdate",time];
|
||||
_object setVariable ["ObjectUID", _uid,true];
|
||||
_object setVariable ["characterID",dayz_characterID,true];
|
||||
|
||||
_allowedObjects = ["TentStorage", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ"];
|
||||
|
||||
if ((typeOf _object) in _allowedObjects) then {
|
||||
if ((typeOf _object) in dayz_allowedObjects) then {
|
||||
_object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
|
||||
};
|
||||
|
||||
|
||||
@@ -28,25 +28,8 @@ if (_spawnDMG) then {
|
||||
_totaldam = 0;
|
||||
_hitpoints = _object call vehicle_getHitpoints;
|
||||
{
|
||||
_dam = 0;
|
||||
if(["Body",_x,false] call fnc_inString) then {
|
||||
_dam = call generate_new_damage;
|
||||
};
|
||||
if(["Engine",_x,false] call fnc_inString) then {
|
||||
_dam = call generate_exp_damage;
|
||||
};
|
||||
if(["HRotor",_x,false] call fnc_inString) then {
|
||||
_dam = call generate_new_damage;
|
||||
};
|
||||
if(["Fuel",_x,false] call fnc_inString) then {
|
||||
_dam = call generate_exp_damage;
|
||||
};
|
||||
if(["Wheel",_x,false] call fnc_inString) then {
|
||||
_dam = call generate_new_damage;
|
||||
};
|
||||
if(["Glass",_x,false] call fnc_inString) then {
|
||||
_dam = call generate_new_damage;
|
||||
};
|
||||
// generate damage on all parts
|
||||
_dam = call generate_new_damage;
|
||||
|
||||
_selection = getText(configFile >> "cfgVehicles" >> _class >> "HitPoints" >> _x >> "name");
|
||||
|
||||
@@ -60,11 +43,8 @@ if (_spawnDMG) then {
|
||||
// just set low base dmg - may change later
|
||||
_damage = 0;
|
||||
|
||||
// 50% chance that vehicle will have a little gas
|
||||
_randFuel = random(1);
|
||||
if(_randFuel > 0.5) then {
|
||||
_fuel = random(0.5);
|
||||
};
|
||||
// New fuel min max
|
||||
_fuel = (random(DynamicVehicleFuelHigh-DynamicVehicleFuelLow)+DynamicVehicleFuelLow) / 100;
|
||||
|
||||
};
|
||||
};
|
||||
@@ -134,5 +114,9 @@ dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
|
||||
|
||||
_object call fnc_vehicleEventHandler;
|
||||
|
||||
// testing - should make sure everyone has eventhandlers for vehicles was unused...
|
||||
dayzVehicleInit = _object;
|
||||
publicVariable "dayzVehicleInit";
|
||||
|
||||
diag_log ("PUBLISH: Created " + (_class) + " with ID " + str(_uid));
|
||||
};
|
||||
@@ -97,6 +97,12 @@ _key call server_hiveWrite;
|
||||
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
|
||||
|
||||
_object call fnc_vehicleEventHandler;
|
||||
|
||||
// for non JIP users this should make sure everyone has eventhandlers for vehicles.
|
||||
dayzVehicleInit = _object;
|
||||
publicVariable "dayzVehicleInit";
|
||||
|
||||
|
||||
|
||||
diag_log ("PUBLISH: Created " + (_class) + " with ID " + str(_uid));
|
||||
};
|
||||
@@ -79,6 +79,9 @@ while {true} do {
|
||||
|
||||
_crash setVariable ["ObjectID",1,true];
|
||||
|
||||
// Disable simulation server side
|
||||
_crash enableSimulation false;
|
||||
|
||||
_num = round(random _randomizedLoot) + _guaranteedLoot;
|
||||
|
||||
if(_crashModel == "Mass_grave") then {
|
||||
@@ -97,7 +100,7 @@ while {true} do {
|
||||
|
||||
_config = configFile >> "CfgBuildingLoot" >> _lootTable;
|
||||
_itemTypes = [] + getArray (_config >> "itemType");
|
||||
_index = dayz_CBLBase find _lootTable;
|
||||
_index = dayz_CBLBase find toLower(_lootTable);
|
||||
_weights = dayz_CBLChances select _index;
|
||||
_cntWeights = count _weights;
|
||||
|
||||
|
||||
@@ -3,4 +3,4 @@ _pos = _this select 0;
|
||||
|
||||
{
|
||||
[_x, "gear"] call server_updateObject;
|
||||
} forEach nearestObjects [_pos, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage", "VaultStorage"], 10];
|
||||
} forEach nearestObjects [_pos, dayz_updateObjects, 10];
|
||||
|
||||
@@ -33,15 +33,15 @@ if (!_parachuteWest) then {
|
||||
_isNotOk = true;
|
||||
|
||||
// Loop to wait it out
|
||||
_counter = _object getVariable ["markedForRemoval","0"];
|
||||
_counter = _object getVariable ["markedForRemoval",0];
|
||||
|
||||
_removeCounter = _counter + 1;
|
||||
_object setVariable ["markedForRemoval",(_counter + 1)];
|
||||
};
|
||||
};
|
||||
|
||||
if (_isNotOk and _removeCounter < 5) exitWith { diag_log(format["About to remove vehicle: %1 - %2 / 10", typeOf _object, _removeCounter]); };
|
||||
if (_isNotOk and _removeCounter >= 5) exitWith { deleteVehicle _object; };
|
||||
if (_isNotOk and _removeCounter < 10) exitWith { diag_log(format["About to remove vehicle: %1 - %2 / 10", typeOf _object, _removeCounter]); };
|
||||
if (_isNotOk and _removeCounter >= 10) exitWith { deleteVehicle _object; };
|
||||
|
||||
|
||||
_lastUpdate = _object getVariable ["lastUpdate",time];
|
||||
|
||||
@@ -58,9 +58,8 @@ check_publishobject = {
|
||||
_allowed = false;
|
||||
|
||||
diag_log format ["DEBUG: Checking if Object: %1 is allowed published by %2", _object, _playername];
|
||||
_allowedObjects = ["TentStorage", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ"];
|
||||
|
||||
if ((typeOf _object) in _allowedObjects) then {
|
||||
if ((typeOf _object) in dayz_allowedObjects) then {
|
||||
diag_log format ["DEBUG: Object: %1 published by %2 is Safe",_object, _playername];
|
||||
_allowed = true;
|
||||
};
|
||||
@@ -257,8 +256,9 @@ spawn_vehicles = {
|
||||
clearMagazineCargoGlobal _veh;
|
||||
|
||||
// Add 0-3 loots to vehicle using random cfgloots
|
||||
_allCfgLoots = [] + (getArray (configFile >> "cfgLoot"));
|
||||
_num = floor(random 4);
|
||||
_allCfgLoots = ["trash","civilian","food","generic","medical","military","policeman","hunter","worker","clothes","militaryclothes","specialclothes","trash"];
|
||||
|
||||
|
||||
diag_log("DEBUG: spawing loot inside vehicle " + str(_allCfgLoots));
|
||||
|
||||
@@ -320,6 +320,8 @@ spawn_roadblocks = {
|
||||
|
||||
diag_log("DEBUG: Spawning a crashed " + _spawnveh + " with " + _spawnloot + " at " + str(_position));
|
||||
_veh = createVehicle [_spawnveh,_position, [], 0, "CAN_COLLIDE"];
|
||||
_veh enableSimulation false;
|
||||
|
||||
// Randomize placement a bit
|
||||
_veh setDir round(random 360);
|
||||
_veh setpos _position;
|
||||
@@ -364,6 +366,13 @@ if(isnil "DynamicVehicleDamageHigh") then {
|
||||
DynamicVehicleDamageHigh = 100;
|
||||
};
|
||||
|
||||
if(isnil "DynamicVehicleFuelLow") then {
|
||||
DynamicVehicleFuelLow = 0;
|
||||
};
|
||||
if(isnil "DynamicVehicleFuelHigh") then {
|
||||
DynamicVehicleFuelHigh = 100;
|
||||
};
|
||||
|
||||
// Damage generator function
|
||||
generate_new_damage = {
|
||||
private ["_damage"];
|
||||
|
||||
@@ -25,7 +25,6 @@ if (_script != "") then
|
||||
|
||||
serverVehicleCounter = [];
|
||||
|
||||
_allowedObjects = ["TentStorage", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ"];
|
||||
//Stream in objects
|
||||
/* STREAM OBJECTS */
|
||||
//Send the key
|
||||
@@ -99,13 +98,10 @@ _allowedObjects = ["TentStorage", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1
|
||||
clearWeaponCargoGlobal _object;
|
||||
clearMagazineCargoGlobal _object;
|
||||
|
||||
if ((typeOf _object) in _allowedObjects) then {
|
||||
// Forces object to ground may not be needed
|
||||
// _pos set [2,0];
|
||||
// Must be set to damage buildables
|
||||
if ((typeOf _object) in dayz_allowedObjects) then {
|
||||
_object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
|
||||
};
|
||||
|
||||
|
||||
_object setdir _dir;
|
||||
_object setpos _pos;
|
||||
_object setDamage _damage;
|
||||
@@ -190,7 +186,6 @@ _allowedObjects = ["TentStorage", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1
|
||||
};
|
||||
|
||||
//Monitor the object
|
||||
//_object enableSimulation false;
|
||||
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
|
||||
};
|
||||
} forEach _myArray;
|
||||
|
||||
Reference in New Issue
Block a user