This commit is contained in:
PabstMirror 2015-08-14 15:14:36 -05:00
parent 066a78d9aa
commit 2be74dfdca
4 changed files with 9 additions and 5 deletions

View File

@ -14,6 +14,8 @@ params ["_unit", "_vehicle", "_hitPoint", "_classname"];
TRACE_4("params",_unit,_vehicle,_hitPoint,_classname);
// TODO [_unit, _wheel] call EFUNC(common,claim); on start of action
private ["_hitPointDamage", "_newDamage", "_wheel"];
_wheel = objNull;
{
@ -24,7 +26,7 @@ _wheel = objNull;
if (isNull _wheel) exitwith {};
// get current hitpoint damage
private "_hitPointDamage";
_hitPointDamage = _vehicle getHitPointDamage _hitPoint;
_newDamage = (1 - (damage _wheel)) / 4; // require 4 tracks to fully replace one side

View File

@ -14,6 +14,8 @@ params ["_unit", "_vehicle", "_hitPoint", "_classname"];
TRACE_4("params",_unit,_vehicle,_hitPoint,_classname);
// TODO [_unit, _wheel] call EFUNC(common,claim); on start of action
private["_hitPointDamage", "_wheel"];
_wheel = objNull;
{
@ -24,7 +26,6 @@ _wheel = objNull;
if (isNull _wheel) exitwith {};
// get current hitpoint damage
private "_hitPointDamage";
_hitPointDamage = _vehicle getHitPointDamage _hitPoint;
// can't replace not destroyed wheel

View File

@ -14,6 +14,8 @@ params ["_unit", "_vehicle", "_hitPoint", "_classname"];
TRACE_4("params",_unit,_vehicle,_hitPoint,_classname);
// TODO [_unit, _wheel] call EFUNC(common,claim); on start of action
private ["_hitPointDamage", "_wheel"];
_wheel = objNull;
{
@ -24,7 +26,6 @@ _wheel = objNull;
if (isNull _wheel) exitwith {};
// get current hitpoint damage
private "_hitPointDamage";
_hitPointDamage = _vehicle getHitPointDamage _hitPoint;
// can't replace not destroyed wheel

View File

@ -19,7 +19,7 @@
params ["_caller", "_target", "_hitPoint", "_className"];
TRACE_4("params",_calller,_target,_hitPoint,_className);
private ["_config", "_engineerRequired", "_items", "_locations", "_return", "_condition", "_vehicleStateCondition"];
private["_callbackProgress", "_callerAnim", "_calller", "_condition", "_config", "_consumeItems", "_displayText", "_engineerRequired", "_iconDisplayed", "_items", "_locations", "_repairTime", "_repairTimeConfig", "_return", "_usersOfItems", "_vehicleStateCondition", "_wpn"];
_config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className);
if !(isClass _config) exitwith {false}; // or go for a default?
@ -157,7 +157,7 @@ _repairTime = if (isNumber (_config >> "repairingTime")) then {
if (typeName _repairTimeConfig == "SCALAR") exitwith {
_repairTimeConfig;
};
[_caller, _target, _selectionName, _className] call _repairTimeConfig;
[_caller, _target, _hitPoint, _className] call _repairTimeConfig;
};
0;
};