mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
It makes no sense to rename the identical DayZ PVs to have an E in their name. I don't see any good reason it was done in the first place. All it accomplishes is breaking script compatibility between the two mods and requiring different publicvariable.txt filters. The only time it makes sense is for custom Epoch variables that aren't used in vanilla. All admins have to do to update custom scripts is swap the names according to the change log. Note I've submitted a pull request to replace PVDZ_veh_Save with PVDZ_obj_Save in official too because they are duplicates.
28 lines
922 B
Plaintext
28 lines
922 B
Plaintext
private["_unit","_hitPoints","_selection","_killer"];
|
|
|
|
_unit = _this select 0;
|
|
_killer = _this select 1;
|
|
|
|
_hitPoints = _unit call vehicle_getHitpoints;
|
|
{
|
|
_selection = getText (configFile >> "CfgVehicles" >> (typeof _unit) >> "HitPoints" >> _x >> "name");
|
|
_unit setVariable [_selection, 1, true];
|
|
} count _hitPoints;
|
|
|
|
// ask server to set global damage to 1, save to the hive
|
|
if (isServer) then {
|
|
[_unit, "killed"] call server_updateObject;
|
|
} else {
|
|
if (DZE_Debug_Damage && ((!isPlayer _unit) || ((isPlayer _unit) && (vehicle _unit != _unit) && (_unit != _killer)))) then {
|
|
PVDZ_obj_Save = [_unit, "killed",_killer];
|
|
} else {
|
|
PVDZ_obj_Save = [_unit, "killed"];
|
|
};
|
|
publicVariableServer "PVDZ_obj_Save";
|
|
};
|
|
|
|
// everyone removes their EH for this vehicle
|
|
_unit removeAllEventHandlers "HandleDamage";
|
|
_unit removeAllEventHandlers "Killed";
|
|
_unit removeAllEventHandlers "GetIn";
|
|
_unit removeAllEventHandlers "GetOut"; |