Update vanilla player build

Vanilla development commits applied:

a2193626a0

deb7207672

2de1d90edd

8a914606cf
This commit is contained in:
ebaydayz
2016-08-21 11:58:32 -04:00
parent f0e0f6d6e4
commit fd90eda8ae
5 changed files with 12 additions and 15 deletions

View File

@@ -46,7 +46,7 @@ if (!isNull _cursorTarget and !_inVehicle and (player distance _cursorTarget < 4
s_player_building = -1;
};
if (_maintenanceMode and (_cursorTarget iskindof "DZ_buildables") and isClass(configFile >> "CfgVehicles" >> (typeof _cursorTarget) >> "Maintenance")) then {
if ((_maintenanceMode or (damage _cursorTarget > 0)) and (_cursorTarget iskindof "DZ_buildables") and isClass(configFile >> "CfgVehicles" >> (typeof _cursorTarget) >> "Maintenance")) then {
if (s_player_maintenance < 0) then {
s_player_maintenance = player addAction [format[localize "str_maintenance",_text], "\z\addons\dayz_code\actions\object_maintenance.sqf",_cursorTarget, 0, false, true, "", ""];
};

View File

@@ -6,23 +6,23 @@ Called by "HandleDamage" vehicle Event Handler
- [unit, damage] call fnc_obj_handleDam;
- return : updated damage
************************************************************/
private["_obj","_total","_currentDamage"];
private["_obj","_total","_damage"];
_obj = _this select 0;
_damage = _this select 2;
_damage = _this select 1;
_total = (damage _obj);
if (_damage > 0) then {
_total = (damage _obj) + _damage;
if (!isServer) then {
PVDZ_veh_Save = [_obj,"objWallDamage",_total];
PVDZ_veh_Save = [_obj,"objWallDamage",(_total + _damage)];
publicVariableServer "PVDZ_veh_Save";
} else {
[_obj,"objWallDamage",_total] call server_updateObject;
[_obj,"objWallDamage",(_total + _damage)] call server_updateObject;
};
};
//diag_log format["INFO - %1(%3) - %2(%4)",_obj,_damage,(typeof _obj),(_total + _damage)];
// all "HandleDamage event" functions should return the effective damage that the engine will record for that part
_total
0