mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-22 20:12:20 +03:00
Prevent issues caused by respawn_west marker being moved
Vanilla commit:
39bcedb4b6
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//private ["_class","_position","_dir","_group","_oldUnit","_newUnit","_currentWpn","_muzzles","_currentAnim","_playerUID","_weapons","_magazines","_primweapon","_secweapon","_newBackpackType","_backpackWpn","_backpackMag","_backpackWpnTypes","_backpackWpnQtys","_countr","_backpackmagTypes","_backpackmagQtys","_display","_createSafePos","_wpnType","_ismelee","_rndx","_rndy"];
|
||||
//private ["_class","_position","_dir","_group","_oldUnit","_newUnit","_currentWpn","_muzzles","_currentAnim","_playerUID","_weapons","_magazines","_primweapon","_secweapon","_newBackpackType","_backpackWpn","_backpackMag","_backpackWpnTypes","_backpackWpnQtys","_countr","_backpackmagTypes","_backpackmagQtys","_display","_wpnType","_ismelee","_rndx","_rndy"];
|
||||
private ["_weapons","_backpackWpn","_backpackMag","_currentWpn","_isWeapon","_backpackWpnTypes","_backpackWpnQtys","_countr","_class","_position","_dir","_currentAnim","_playerUID","_countMags","_magazines","_primweapon","_secweapon","_newBackpackType","_muzzles","_oldUnit","_group","_newUnit","_oldGroup","_idc","_display","_switchUnit","_leader"];
|
||||
_class = _this;
|
||||
if (gear_done) then {disableUserInput true;disableUserInput true;};
|
||||
@@ -74,7 +74,7 @@ _leader = (player == leader _oldGroup);
|
||||
//Create New Character
|
||||
//[player] joinSilent grpNull;
|
||||
_group = createGroup west;
|
||||
_newUnit = _group createUnit [_class,getMarkerPos "respawn_west",[],0,"NONE"];
|
||||
_newUnit = _group createUnit [_class,respawn_west_original,[],0,"NONE"];
|
||||
_newUnit setDir _dir;
|
||||
{_newUnit removeMagazine _x;} count magazines _newUnit;
|
||||
removeAllWeapons _newUnit;
|
||||
@@ -110,12 +110,10 @@ _switchUnit = {
|
||||
setPlayable _newUnit;
|
||||
selectPlayer _newUnit;
|
||||
//Switch the units
|
||||
//_createSafePos = [(getMarkerPos "respawn_west"), 2, 100, 0, 1, 20, 0] call BIS_fnc_findSafePos;
|
||||
_createSafePos = getMarkerPos "respawn_west";
|
||||
_rndx = floor(random 100);
|
||||
_rndy = floor(random 100);
|
||||
_oldUnit setPosATL [(_createSafePos select 0) + _rndx, (_createSafePos select 1) + _rndy, 0];
|
||||
if (surfaceIsWater _createSafePos) then {
|
||||
_oldUnit setPosATL [(respawn_west_original select 0) + _rndx, (respawn_west_original select 1) + _rndy, 0];
|
||||
if (surfaceIsWater respawn_west_original) then {
|
||||
//Prevent swimming in ground glitch if respawn is in water
|
||||
_newUnit setPosATL [_position select 0,_position select 1,(_position select 2)+.1];
|
||||
} else {
|
||||
|
||||
@@ -5,7 +5,7 @@ _showText = _this select 1;
|
||||
_enterORleave = _this select 2;
|
||||
|
||||
// Do not show cutText when player changes clothes in trader area
|
||||
if ((dayz_lastClothesChange + 3 > diag_tickTime) or (player distance getMarkerPos "respawn_west" < 15)) then {
|
||||
if ((dayz_lastClothesChange + 3 > diag_tickTime) or (player distance respawn_west_original < 100)) then {
|
||||
_showText = false;
|
||||
};
|
||||
|
||||
|
||||
@@ -492,6 +492,8 @@ switch (dayz_presets) do {
|
||||
};
|
||||
};
|
||||
|
||||
respawn_west_original = getMarkerPos "respawn_west"; //Prevent problems caused by cheaters moving respawn_west marker with setMarkerPos or deleteMarker
|
||||
|
||||
switch (toLower worldName) do {
|
||||
case "napf";
|
||||
case "sauerland" : {dayz_minpos = -1000; dayz_maxpos = 26000;};
|
||||
|
||||
@@ -3,7 +3,6 @@ disableSerialization;
|
||||
_timeOut = 0;
|
||||
_messTimer = 0;
|
||||
_lastTemp = dayz_temperatur;
|
||||
_debug = getMarkerpos "respawn_west";
|
||||
_isPZombie = player isKindOf "PZombie_VB";
|
||||
_radTimer = 0;
|
||||
|
||||
@@ -48,7 +47,7 @@ while {1 == 1} do {
|
||||
//reset position
|
||||
_randomSpot = true;
|
||||
_tempPos = getPosATL player;
|
||||
_distance = _debug distance _tempPos;
|
||||
_distance = respawn_west_original distance _tempPos;
|
||||
if (_distance < 2000) then {
|
||||
_randomSpot = false;
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
sched_antiTP_init = {
|
||||
if (dayz_antihack == 1) then { diag_log [ diag_ticktime, __FILE__, "Anti Teleport inited"]; };
|
||||
[dayz_antihack == 1, [], 0, 0, objNull]
|
||||
[dayz_antihack == 1, [], 0, 0, objNull, respawn_west_original]
|
||||
};
|
||||
|
||||
sched_antiTP = {
|
||||
@@ -19,6 +19,7 @@ sched_antiTP = {
|
||||
_lastheight = _this select 2;
|
||||
_lasttime = _this select 3;
|
||||
_lastVehicle = _this select 4;
|
||||
_debug = _this select 5;
|
||||
|
||||
if (((_antihack) and {(typeName player == "OBJECT")}) AND {((player in playableUnits) AND {(alive player)})}) then {
|
||||
if (count _lastpos != 3) then {
|
||||
@@ -31,7 +32,6 @@ sched_antiTP = {
|
||||
_distance = _lastpos distance _curpos;
|
||||
_curtime = diag_ticktime;
|
||||
_difftime = _curtime - _lasttime;
|
||||
_debug = getMarkerpos "respawn_west";
|
||||
|
||||
if ((_distance > 10) OR {(_difftime > 1)}) then {
|
||||
_curheight = (ATLtoASL _curpos) select 2;
|
||||
|
||||
Reference in New Issue
Block a user