Fix Log System2 and Remove Freefall direction (isnt used in Epoch)

This commit is contained in:
Skaronator
2014-01-25 19:03:43 +01:00
parent f8cffef0a4
commit 8f92222602
2 changed files with 21 additions and 31 deletions

View File

@@ -38,17 +38,6 @@ if (isServer) then {
_x = _this select 1;
if (typeName _x == "STRING") then {
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};

View File

@@ -1,7 +1,5 @@
/*
Anti-Teleport
Created By Razor
Refactored By Alby
Anti-Teleport - Created By Razor / Refactored By Alby & CopyPasted to Epoch by Skaronator
*/
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;
while {true} do {
if (typeName player != "OBJECT") then {
atp = format["WARNING typename error for player UID#%1", _playerUID];
publicVariableServer "atp";
PVDZE_atp = format["WARNING typename error for player UID#%1", _playerUID];
publicVariableServer "PVDZE_atp";
//forceEnd;
endMission "LOSER";
sleep 10; //Bypass spam
@@ -53,8 +51,8 @@ while {true} do {
_plant = _x createVehicleLocal _debug;
sleep 0.1;
if (sizeOf _x == 0) exitWith {
atp = "Plants texture hack for type " + _x;
publicVariableServer "atp";
PVDZE_atp = "Plants texture hack for type " + _x;
publicVariableServer "PVDZE_atp";
endMission "LOSER";
};
deleteVehicle _plant;
@@ -77,7 +75,8 @@ while {true} do {
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 {
(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";
} else {
_lastpos = _curpos;
@@ -92,6 +91,7 @@ while {true} do {
};
};
/*if ((animationState player) != "HaloFreeFall_non") then {
// freefall detection:
_v = -((velocity player) select 2);
_h = (getPosATL player) select 2;
@@ -104,6 +104,7 @@ while {true} do {
_topv = 0;
_toph = 0;
};
};*/
sleep 0.25;
};
sleep 0.1;