From 017d47f8c90e69ff522b22f546edc8b8dd4fb36e Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Tue, 19 Mar 2024 08:57:09 +0100 Subject: [PATCH] Fortify - Skip placement animation for no cost fortifications (#9861) Skip placement animation for no cost fortifications --- addons/fortify/functions/fnc_deployConfirm.sqf | 3 +-- docs/wiki/framework/fortify-framework.md | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/addons/fortify/functions/fnc_deployConfirm.sqf b/addons/fortify/functions/fnc_deployConfirm.sqf index 37e0d4fb9d5..b0105a79196 100644 --- a/addons/fortify/functions/fnc_deployConfirm.sqf +++ b/addons/fortify/functions/fnc_deployConfirm.sqf @@ -38,7 +38,7 @@ private _perframeCheck = { _args params ["_unit", "_side", "_typeOf", "_posASL", "_vectorDir", "_vectorUp", "_cost"]; // Animation loop (required for longer constructions) - if (animationState _unit isNotEqualTo "AinvPknlMstpSnonWnonDnon_medic4") then { + if (_totalTime != 0 && {animationState _unit != "AinvPknlMstpSnonWnonDnon_medic4"}) then { // Perform animation [_unit, "AinvPknlMstpSnonWnonDnon_medic4"] call EFUNC(common,doAnimation); }; @@ -55,4 +55,3 @@ private _perframeCheck = { LLSTRING(progressBarTitle), _perframeCheck ] call EFUNC(common,progressBar); - diff --git a/docs/wiki/framework/fortify-framework.md b/docs/wiki/framework/fortify-framework.md index 3f6619a7460..14d48532b58 100644 --- a/docs/wiki/framework/fortify-framework.md +++ b/docs/wiki/framework/fortify-framework.md @@ -116,8 +116,8 @@ The Fortify budget can be updated for any side using the function. Event Name | Passed Parameter(s) | Locality | Description ---------- | ----------- | ------------------- | -------- -`acex_fortify_objectPlaced` | [player, side, objectPlaced] | Global | Foritfy object placed -`acex_fortify_objectDeleted` | [player, side, objectDeleted] | Global | Foritfy object deleted +`acex_fortify_objectPlaced` | [player, side, objectPlaced] | Global | Fortify object placed +`acex_fortify_objectDeleted` | [player, side, objectDeleted] | Global | Fortify object deleted `acex_fortify_onDeployStart` | [player, object, cost] | Local | Player starts placing object -`ace_fortify_deployFinished` | [player, side, configName, posASL, vectorDir, vectorUp] | Local | Player successfully finishes building object -`ace_fortify_deployCanceled` | [player, side, configName, posASL, vectorDir, vectorUp] | Local | Player cancels building object +`ace_fortify_deployFinished` | [[player, side, configName, posASL, vectorDir, vectorUp, cost], elapsedTime, totalTime, errorCode] | Local | Player successfully finishes building object +`ace_fortify_deployCanceled` | [[player, side, configName, posASL, vectorDir, vectorUp, cost], elapsedTime, totalTime, errorCode] | Local | Player cancels building object