mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
Set third parameter after findSafePos
All other scripts using findSafePos either set the third parameter or
use a getPosATL/etc. instead before the position is saved to database.
Also partially reverted d6e78b2 since it is not needed.
This commit is contained in:
@@ -103,9 +103,6 @@ if(!_cancel) then {
|
|||||||
_removed = ([player,_item] call BIS_fnc_invRemove);
|
_removed = ([player,_item] call BIS_fnc_invRemove);
|
||||||
|
|
||||||
if(_removed == 1) then {
|
if(_removed == 1) then {
|
||||||
|
|
||||||
//call dayz_forceSave;
|
|
||||||
|
|
||||||
_dir = round(direction player);
|
_dir = round(direction player);
|
||||||
["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
|
["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
|
||||||
//wait a bit
|
//wait a bit
|
||||||
|
|||||||
@@ -1106,8 +1106,6 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
|
|||||||
player removeAction s_player_repair_crtl;
|
player removeAction s_player_repair_crtl;
|
||||||
s_player_repair_crtl = -1;
|
s_player_repair_crtl = -1;
|
||||||
dayz_myCursorTarget = objNull;
|
dayz_myCursorTarget = objNull;
|
||||||
//player removeAction s_player_forceSave;
|
|
||||||
//s_player_forceSave = -1;
|
|
||||||
player removeAction s_player_flipveh;
|
player removeAction s_player_flipveh;
|
||||||
s_player_flipveh = -1;
|
s_player_flipveh = -1;
|
||||||
player removeAction s_player_pushPlane;
|
player removeAction s_player_pushPlane;
|
||||||
|
|||||||
@@ -173,6 +173,7 @@ if (count _this > 4) then { //calling from player_onDisconnect
|
|||||||
if (_count > 4) exitWith {_newPos = _charPos;}; // Max 4km away fail safe (needs to finish fast so server_playerSync runs below)
|
if (_count > 4) exitWith {_newPos = _charPos;}; // Max 4km away fail safe (needs to finish fast so server_playerSync runs below)
|
||||||
_newPos = [_charPos, 80, (_maxDist + 800), 10, 1, 0, 0, [], [_charPos,_charPos]] call BIS_fnc_findSafePos;
|
_newPos = [_charPos, 80, (_maxDist + 800), 10, 1, 0, 0, [], [_charPos,_charPos]] call BIS_fnc_findSafePos;
|
||||||
};
|
};
|
||||||
|
_newPos set [2,0]; //findSafePos only returns two elements
|
||||||
_charPos = _newPos;
|
_charPos = _newPos;
|
||||||
diag_log format["%1(%2) logged out in air vehicle. Relocated to safePos.",_name,_playerUID];
|
diag_log format["%1(%2) logged out in air vehicle. Relocated to safePos.",_name,_playerUID];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ _key call server_hiveWrite;
|
|||||||
_object setVariable ["ObjectID", _oid, true];
|
_object setVariable ["ObjectID", _oid, true];
|
||||||
_object setVariable ["lastUpdate",time];
|
_object setVariable ["lastUpdate",time];
|
||||||
_object setVariable ["CharacterID", _characterID, true];
|
_object setVariable ["CharacterID", _characterID, true];
|
||||||
_object setVelocity [0,0,1];
|
//_object setVelocity [0,0,1];
|
||||||
|
|
||||||
if(DZE_TRADER_SPAWNMODE) then {
|
if(DZE_TRADER_SPAWNMODE) then {
|
||||||
_object attachTo [_object_para, [0,0,-1.6]];
|
_object attachTo [_object_para, [0,0,-1.6]];
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ if (count AllowedVehiclesList == 0) then {
|
|||||||
};
|
};
|
||||||
// only proceed if two params otherwise BIS_fnc_findSafePos failed and may spawn in air
|
// only proceed if two params otherwise BIS_fnc_findSafePos failed and may spawn in air
|
||||||
if ((count _position) == 2) then {
|
if ((count _position) == 2) then {
|
||||||
|
_position set [2,0];
|
||||||
_dir = round(random 180);
|
_dir = round(random 180);
|
||||||
_istoomany = _position nearObjects ["AllVehicles",50];
|
_istoomany = _position nearObjects ["AllVehicles",50];
|
||||||
if ((count _istoomany) > 0) exitWith {};
|
if ((count _istoomany) > 0) exitWith {};
|
||||||
|
|||||||
Reference in New Issue
Block a user