mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-04-17 17:56:40 +03:00
Prevent issues caused by respawn_west marker being moved
Vanilla commit:
39bcedb4b6
This commit is contained in:
@@ -60,7 +60,7 @@ if (_characterID != "?") then {
|
||||
*/
|
||||
|
||||
//Punish combat log
|
||||
if (_inCombat && _playerPos distance (getMarkerPos "respawn_west") > 1500) then {
|
||||
if (_inCombat && _playerPos distance respawn_west_original > 1500) then {
|
||||
// Moved setVariables to server_playerSync since they are high priority
|
||||
// Messages are low priority. Player object not needed
|
||||
diag_log format["PLAYER COMBAT LOGGED: %1(%3) at location %2",_playerName,_playerPos,_playerUID];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_characterID","_playerObj","_spawnSelection","_inventory","_playerID","_dummy","_worldspace","_state","_doLoop","_key","_primary","_medical","_stats","_humanity","_randomSpot","_position","_debug","_distance","_fractures","_score","_findSpot","_mkr","_j","_isIsland","_w","_clientID","_lastInstance"];
|
||||
private ["_characterID","_playerObj","_spawnSelection","_inventory","_playerID","_dummy","_worldspace","_state","_doLoop","_key","_primary","_medical","_stats","_humanity","_randomSpot","_position","_distance","_fractures","_score","_findSpot","_mkr","_j","_isIsland","_w","_clientID","_lastInstance"];
|
||||
|
||||
_characterID = _this select 0;
|
||||
_playerObj = _this select 1;
|
||||
@@ -69,10 +69,9 @@ if (count _Achievements == 0) then {_Achievements = [0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|
||||
if (count _worldspace > 0) then {
|
||||
_position = _worldspace select 1;
|
||||
if (count _position < 3) then {_randomSpot = true;}; //prevent debug world!
|
||||
if (count _position < 3) exitWith {_randomSpot = true;}; //prevent debug world!
|
||||
|
||||
_debug = getMarkerpos "respawn_west";
|
||||
_distance = _debug distance _position;
|
||||
_distance = respawn_west_original distance _position;
|
||||
if (_distance < 2000) then {_randomSpot = true;};
|
||||
|
||||
_distance = [0,0,0] distance _position;
|
||||
|
||||
@@ -15,7 +15,7 @@ _isInVehicle = vehicle _character != _character;
|
||||
_timeSince = 0;
|
||||
_humanity = 0;
|
||||
_name = if (alive _character) then {name _character} else {"Dead Player"};
|
||||
_distance = (getMarkerpos "respawn_west" distance _charPos) < 1500;
|
||||
_distance = (respawn_west_original distance _charPos) < 1500;
|
||||
|
||||
if (_character isKindOf "Animal") exitWith {
|
||||
diag_log ("ERROR: Cannot Sync Character " + _name + " is an Animal class");
|
||||
|
||||
@@ -44,13 +44,13 @@ sched_corpses = {
|
||||
if (_x getVariable["bodyName",""] != "") then {
|
||||
_deathTime = _x getVariable ["sched_co_deathTime", -1];
|
||||
if (_deathTime == -1) then {
|
||||
_deathPos = _x getVariable [ "deathPos", getMarkerPos "respawn_west" ];
|
||||
_cpos = getPosATL _x;
|
||||
_deathPos = _x getVariable ["deathPos",respawn_west_original];
|
||||
/*_cpos = getPosATL _x;
|
||||
// forbid a move further than 50 meters, or burried body (antihack)
|
||||
if (_deathPos distance _cpos > 50 or _deathPos select 2 < -0.2) then {
|
||||
diag_log [ __FILE__, "Corpse should have been moved! CID#",(_x getVariable["characterID", "?"]),"from:", _cpos, "to:", _deathPos ];
|
||||
//_x setPosATL _deathPos;
|
||||
};
|
||||
};*/
|
||||
_deathTime = diag_tickTime;
|
||||
_x setVariable ["sched_co_deathTime", _deathTime];
|
||||
_x setVariable ["sched_co_fliesAdded", true];
|
||||
|
||||
@@ -503,8 +503,7 @@ if (_hiveLoaded) then {
|
||||
|
||||
[] spawn server_spawnEvents;
|
||||
/* //Causes issues with changing clothes
|
||||
_debugMarkerPosition = getMarkerPos "respawn_west";
|
||||
_debugMarkerPosition = [(_debugMarkerPosition select 0),(_debugMarkerPosition select 1),1];
|
||||
_debugMarkerPosition = [(respawn_west_original select 0),(respawn_west_original select 1),1];
|
||||
_vehicle_0 = createVehicle ["DebugBox_DZ", _debugMarkerPosition, [], 0, "CAN_COLLIDE"];
|
||||
_vehicle_0 setPos _debugMarkerPosition;
|
||||
_vehicle_0 setVariable ["ObjectID","1",true];
|
||||
|
||||
Reference in New Issue
Block a user