mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
1.0.1.7 DEV TEST
+ [CHANGED] Can now fill empty fuel barrels on standard fuel tanks. + [CHANGED] Increased range of crafting from 2m to 3m + [FIXED] Removed repair action from tow truck with VIL_asistvan_DZE + [ADDED] Tow truck VIL_asistvan_DZE can tow vehicles that fit within the bounding box of the model. + [ADDED] Ability for fuel trucks to fill nearby vehicles 30m when engine is running. + [CHANGED] Reworked Epoch events scheduler and made it more accurate. + [REMOVED] Road debris no longer spawn loot, helps with performance and we have added extra loot positions in the world. + and more
This commit is contained in:
@@ -1,17 +1,23 @@
|
||||
private ["_characterID","_playerObj","_playerID","_dummy","_worldspace","_state","_doLoop","_key","_primary","_medical","_stats","_humanity","_lastinstance","_friendlies","_randomSpot","_position","_debug","_distance","_hit","_fractures","_score","_findSpot","_pos","_isIsland","_w","_clientID","_spawnMC"];
|
||||
//Wait for HIVE to be free
|
||||
//diag_log ("SETUP: attempted with " + str(_this));
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("SETUP: attempted with " + str(_this));
|
||||
#endif
|
||||
|
||||
_characterID = _this select 0;
|
||||
_playerObj = _this select 1;
|
||||
_playerID = getPlayerUID _playerObj;
|
||||
|
||||
if (isNull _playerObj) exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("SETUP INIT FAILED: Exiting, player object null: " + str(_playerObj));
|
||||
#endif
|
||||
};
|
||||
|
||||
//Add MPHit event handler
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log("Adding MPHit EH for " + str(_playerObj));
|
||||
#endif
|
||||
_playerObj addMPEventHandler ["MPHit", {_this spawn fnc_plyrHit;}];
|
||||
|
||||
if (_playerID == "") then {
|
||||
@@ -19,13 +25,17 @@ if (_playerID == "") then {
|
||||
};
|
||||
|
||||
if (_playerID == "") exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("SETUP INIT FAILED: Exiting, no player ID: " + str(_playerObj));
|
||||
#endif
|
||||
};
|
||||
|
||||
private["_dummy"];
|
||||
_dummy = getPlayerUID _playerObj;
|
||||
if ( _playerID != _dummy ) then {
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log format["DEBUG: _playerID miscompare with UID! _playerID:%1",_playerID];
|
||||
#endif
|
||||
_playerID = _dummy;
|
||||
};
|
||||
|
||||
@@ -48,11 +58,15 @@ while {_doLoop < 5} do {
|
||||
};
|
||||
|
||||
if (isNull _playerObj or !isPlayer _playerObj) exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("SETUP RESULT: Exiting, player object null: " + str(_playerObj));
|
||||
#endif
|
||||
};
|
||||
|
||||
//Wait for HIVE to be free
|
||||
//diag_log ("SETUP: RESULT: Successful with " + str(_primary));
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("SETUP: RESULT: Successful with " + str(_primary));
|
||||
#endif
|
||||
|
||||
_medical = _primary select 1;
|
||||
_stats = _primary select 2;
|
||||
@@ -62,14 +76,11 @@ _humanity = _primary select 5;
|
||||
_lastinstance = _primary select 6;
|
||||
|
||||
_namespace = profileNamespace;
|
||||
|
||||
_friendlies = _namespace getVariable ["friendlies", []];;
|
||||
|
||||
//Set position
|
||||
_randomSpot = false;
|
||||
|
||||
//diag_log ("WORLDSPACE: " + str(_worldspace));
|
||||
|
||||
if (count _worldspace > 0) then {
|
||||
|
||||
_position = _worldspace select 1;
|
||||
@@ -98,7 +109,9 @@ if (count _worldspace > 0) then {
|
||||
_randomSpot = true;
|
||||
};
|
||||
|
||||
//diag_log ("LOGIN: Location: " + str(_worldspace) + " doRnd?: " + str(_randomSpot));
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("LOGIN: Location: " + str(_worldspace) + " doRnd?: " + str(_randomSpot));
|
||||
#endif
|
||||
|
||||
//set medical values
|
||||
if (count _medical > 0) then {
|
||||
@@ -110,16 +123,8 @@ if (count _medical > 0) then {
|
||||
_playerObj setVariable["USEC_isCardiac",(_medical select 5),true];
|
||||
_playerObj setVariable["USEC_lowBlood",(_medical select 6),true];
|
||||
_playerObj setVariable["USEC_BloodQty",(_medical select 7),true];
|
||||
|
||||
_playerObj setVariable["unconsciousTime",(_medical select 10),true];
|
||||
|
||||
// if (_playerID in dayz_disco) then {
|
||||
// _playerObj setVariable["NORRN_unconscious",true, true];
|
||||
// _playerObj setVariable["unconsciousTime",300,true];
|
||||
// } else {
|
||||
// _playerObj setVariable["unconsciousTime",(_medical select 10),true];
|
||||
// };
|
||||
|
||||
_playerObj setVariable["unconsciousTime",(_medical select 10),true];
|
||||
|
||||
//Add Wounds
|
||||
{
|
||||
_playerObj setVariable[_x,true,true];
|
||||
@@ -192,7 +197,6 @@ if (_randomSpot) then {
|
||||
endLoadingScreen;
|
||||
};
|
||||
|
||||
|
||||
//Spawn modify via mission init.sqf
|
||||
if(isnil "spawnArea") then {
|
||||
spawnArea = 1500;
|
||||
@@ -240,7 +244,6 @@ if (_randomSpot) then {
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
//Record player for management
|
||||
dayz_players set [count dayz_players,_playerObj];
|
||||
|
||||
@@ -263,9 +266,9 @@ if(!isNull _playerObj) then {
|
||||
_playerObj setVariable ["lastTime",time];
|
||||
//_playerObj setVariable ["model_CHK",typeOf _playerObj];
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("LOGIN PUBLISHING: " + str(_playerObj) + " Type: " + (typeOf _playerObj));
|
||||
#endif
|
||||
|
||||
dayzLogin = null;
|
||||
dayzLogin2 = null;
|
||||
|
||||
//Save Login
|
||||
dayzLogin2 = null;
|
||||
Reference in New Issue
Block a user