mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-18 17:42:01 +03:00
Fix Log System2 and Remove Freefall direction (isnt used in Epoch)
This commit is contained in:
@@ -38,17 +38,6 @@ if (isServer) then {
|
|||||||
_x = _this select 1;
|
_x = _this select 1;
|
||||||
if (typeName _x == "STRING") then {
|
if (typeName _x == "STRING") then {
|
||||||
diag_log _x;
|
diag_log _x;
|
||||||
/*} else {
|
|
||||||
_unit = _x select 0;
|
|
||||||
_source = _x select 1;
|
|
||||||
if (((!(isNil {_source})) AND {(!(isNull _source))}) AND {((_source isKindOf "CAManBase") AND {(owner _unit != owner _source)})}) then {
|
|
||||||
diag_log format ["Player %1 hit by %2 %3 from %4 meters",
|
|
||||||
_unit call fa_plr2Str, _source call fa_plr2Str, _x select 2, _x select 3];
|
|
||||||
if (_unit getVariable["processedDeath", 0] == 0) then {
|
|
||||||
_unit setVariable [ "attacker", name _source ];
|
|
||||||
_unit setVariable [ "noatlf4", diag_ticktime ]; // server-side "not in combat" test, if player is not already dead
|
|
||||||
};
|
|
||||||
};*/
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"PVDZE_plr_Died" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerDied};
|
"PVDZE_plr_Died" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerDied};
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Anti-Teleport
|
Anti-Teleport - Created By Razor / Refactored By Alby & CopyPasted to Epoch by Skaronator
|
||||||
Created By Razor
|
|
||||||
Refactored By Alby
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private ["_log","_playerName","_playerUID","_al1veOnce","_debug","_lastpos","_lastheight","_lasttime","_lastVehicle","_v","_h","_topv","_toph","_curpos","_distance","_curtime","_difftime","_plant","_curheight","_speed","_topSpeed","_terrainHeight","_differenceCheck","_lastPosVar","_safetyVehicle","_curPos"];
|
private ["_log","_playerName","_playerUID","_al1veOnce","_debug","_lastpos","_lastheight","_lasttime","_lastVehicle","_v","_h","_topv","_toph","_curpos","_distance","_curtime","_difftime","_plant","_curheight","_speed","_topSpeed","_terrainHeight","_differenceCheck","_lastPosVar","_safetyVehicle","_curPos"];
|
||||||
@@ -14,8 +12,8 @@ waitUntil {vehicle player == player};
|
|||||||
_playerUID = getPlayerUID player;
|
_playerUID = getPlayerUID player;
|
||||||
while {true} do {
|
while {true} do {
|
||||||
if (typeName player != "OBJECT") then {
|
if (typeName player != "OBJECT") then {
|
||||||
atp = format["WARNING typename error for player UID#%1", _playerUID];
|
PVDZE_atp = format["WARNING typename error for player UID#%1", _playerUID];
|
||||||
publicVariableServer "atp";
|
publicVariableServer "PVDZE_atp";
|
||||||
//forceEnd;
|
//forceEnd;
|
||||||
endMission "LOSER";
|
endMission "LOSER";
|
||||||
sleep 10; //Bypass spam
|
sleep 10; //Bypass spam
|
||||||
@@ -53,8 +51,8 @@ while {true} do {
|
|||||||
_plant = _x createVehicleLocal _debug;
|
_plant = _x createVehicleLocal _debug;
|
||||||
sleep 0.1;
|
sleep 0.1;
|
||||||
if (sizeOf _x == 0) exitWith {
|
if (sizeOf _x == 0) exitWith {
|
||||||
atp = "Plants texture hack for type " + _x;
|
PVDZE_atp = "Plants texture hack for type " + _x;
|
||||||
publicVariableServer "atp";
|
publicVariableServer "PVDZE_atp";
|
||||||
endMission "LOSER";
|
endMission "LOSER";
|
||||||
};
|
};
|
||||||
deleteVehicle _plant;
|
deleteVehicle _plant;
|
||||||
@@ -77,7 +75,8 @@ while {true} do {
|
|||||||
if (_lastVehicle == vehicle player) then {
|
if (_lastVehicle == vehicle player) then {
|
||||||
if ((_speed > _topSpeed) && (alive player) && ((driver (vehicle player) == player) or (isNull (driver (vehicle player)))) && (_debug distance _lastpos > 3000) && !((vehicle player == player) && (_curheight < _lastheight) && ((_curheight - _terrainHeight) > 1))) then {
|
if ((_speed > _topSpeed) && (alive player) && ((driver (vehicle player) == player) or (isNull (driver (vehicle player)))) && (_debug distance _lastpos > 3000) && !((vehicle player == player) && (_curheight < _lastheight) && ((_curheight - _terrainHeight) > 1))) then {
|
||||||
(vehicle player) setposATL _lastpos;
|
(vehicle player) setposATL _lastpos;
|
||||||
PVDZE_atp = [name player, dayz_characterID, _lastpos, _curPos, getPosATL player];
|
//PVDZE_atp = [name player, dayz_characterID, _lastpos, _curPos, getPosATL player];
|
||||||
|
PVDZE_atp = format["TELEPORT REVERT for player UID#%1 from %2 to %3, %4 meters, now at %5", getPlayerUID player, _lastpos, _curPos, round(_lastpos distance _curpos), getPosATL player];
|
||||||
publicVariableServer "PVDZE_atp";
|
publicVariableServer "PVDZE_atp";
|
||||||
} else {
|
} else {
|
||||||
_lastpos = _curpos;
|
_lastpos = _curpos;
|
||||||
@@ -92,18 +91,20 @@ while {true} do {
|
|||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
// freefall detection:
|
/*if ((animationState player) != "HaloFreeFall_non") then {
|
||||||
_v = -((velocity player) select 2);
|
// freefall detection:
|
||||||
_h = (getPosATL player) select 2;
|
_v = -((velocity player) select 2);
|
||||||
if (_v > 4 AND _h > 3) then {
|
_h = (getPosATL player) select 2;
|
||||||
_topv = _topv max _v;
|
if (_v > 4 AND _h > 3) then {
|
||||||
_toph = _toph max _h;
|
_topv = _topv max _v;
|
||||||
Dayz_freefall = [ time, _toph, _topv ];
|
_toph = _toph max _h;
|
||||||
}
|
Dayz_freefall = [ time, _toph, _topv ];
|
||||||
else {
|
}
|
||||||
_topv = 0;
|
else {
|
||||||
_toph = 0;
|
_topv = 0;
|
||||||
};
|
_toph = 0;
|
||||||
|
};
|
||||||
|
};*/
|
||||||
sleep 0.25;
|
sleep 0.25;
|
||||||
};
|
};
|
||||||
sleep 0.1;
|
sleep 0.1;
|
||||||
|
|||||||
Reference in New Issue
Block a user