mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fortify - Fix funds being lost when canceling deploy (#8992)
This commit is contained in:
parent
131b0b9472
commit
286537cd54
@ -76,7 +76,7 @@ GVAR(objectRotationZ) = 0;
|
||||
// Place object event handler
|
||||
[QGVAR(deployFinished), {
|
||||
params ["_args", "_elapsedTime", "_totalTime", "_errorCode"];
|
||||
_args params ["_unit", "_side", "_typeOf", "_posASL", "_vectorDir", "_vectorUp"];
|
||||
_args params ["_unit", "_side", "_typeOf", "_posASL", "_vectorDir", "_vectorUp", "_cost"];
|
||||
|
||||
private _newObject = _typeOf createVehicle _posASL;
|
||||
_newObject setPosASL _posASL;
|
||||
@ -96,7 +96,10 @@ GVAR(objectRotationZ) = 0;
|
||||
|
||||
[QGVAR(deployCanceled), {
|
||||
params ["_args", "_elapsedTime", "_totalTime", "_errorCode"];
|
||||
_args params ["_unit", "_side", "_typeOf", "_posASL", "_vectorDir", "_vectorUp"];
|
||||
_args params ["_unit", "_side", "_typeOf", "_posASL", "_vectorDir", "_vectorUp", "_cost"];
|
||||
|
||||
// Refund if deploy was canceled
|
||||
[_side, _cost] call FUNC(updateBudget);
|
||||
|
||||
// Reset animation
|
||||
[_unit, "", 1] call EFUNC(common,doAnimation);
|
||||
|
@ -20,10 +20,10 @@ params ["_unit", "_object"];
|
||||
TRACE_2("deployConfirm",_unit,_object);
|
||||
|
||||
private _side = side group _unit;
|
||||
private _cost = [_side, typeOf _object] call FUNC(getCost);
|
||||
private _typeOf = typeOf _object;
|
||||
private _cost = [_side, _typeOf] call FUNC(getCost);
|
||||
[_side, -_cost] call FUNC(updateBudget);
|
||||
|
||||
private _typeOf = typeOf _object;
|
||||
private _posASL = getPosASL _object;
|
||||
private _vectorUp = vectorUp _object;
|
||||
private _vectorDir = vectorDir _object;
|
||||
@ -35,7 +35,7 @@ private _totalTime = _cost * GVAR(timeCostCoefficient) + GVAR(timeMin); // time
|
||||
|
||||
private _perframeCheck = {
|
||||
params ["_args", "_elapsedTime", "_totalTime", "_errorCode"];
|
||||
_args params ["_unit", "_side", "_typeOf", "_posASL", "_vectorDir", "_vectorUp"];
|
||||
_args params ["_unit", "_side", "_typeOf", "_posASL", "_vectorDir", "_vectorUp", "_cost"];
|
||||
|
||||
// Animation loop (required for longer constructions)
|
||||
if (animationState _unit isNotEqualTo "AinvPknlMstpSnonWnonDnon_medic4") then {
|
||||
@ -49,7 +49,7 @@ private _perframeCheck = {
|
||||
|
||||
[
|
||||
_totalTime,
|
||||
[_unit, _side, _typeOf, _posASL, _vectorDir, _vectorUp],
|
||||
[_unit, _side, _typeOf, _posASL, _vectorDir, _vectorUp, _cost],
|
||||
QGVAR(deployFinished),
|
||||
QGVAR(deployCanceled),
|
||||
LLSTRING(progressBarTitle),
|
||||
|
Loading…
Reference in New Issue
Block a user