Add medic anim function with proper interrupt

Closes #1386

Vanilla commits
applied:
f99a3deced
731b957e8e

Removed
two unused files and a few variables made redundant by actionInProgress
This commit is contained in:
ebayShopper
2017-06-06 15:24:59 -04:00
parent 36b67affee
commit 48858b2e6c
61 changed files with 507 additions and 1341 deletions

View File

@@ -11,6 +11,9 @@ private ["_classType","_item","_action","_missingTools","_missingItem","_emergin
Needs a full rewrite to keep up with the demand of everything we plan to add.
*/
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
dayz_actionInProgress = true;
call gear_ui_init;
closeDialog 1;
@@ -25,7 +28,6 @@ if (count _this > 2) then {
};
_emergingLevel = 1.1;
dayz_actionInProgress = true;
_isClass = switch (1==1) do {
case (isClass (configFile >> "CfgMagazines" >> _item)): {"CfgMagazines"};
@@ -52,12 +54,9 @@ _keepOnSlope = 0 == (getNumber (configFile >> "CfgVehicles" >> _classname >> "ca
_onLadder = {getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder") == 1};
_isWater = {(surfaceIsWater (getPosATL _object)) or dayz_isSwimming};
if (0 != count Dayz_constructionContext) then {
if (0 != count Dayz_constructionContext) exitWith {
dayz_actionInProgress = false;
//cutText [localize "str_already_building", "PLAIN DOWN"];
_msg = localize "str_already_building";
_msg call dayz_rollingMessages;
diag_log [ diag_ticktime, __FILE__, 'already building, exiting', Dayz_constructionContext, typeName Dayz_constructionContext];
localize "str_already_building" call dayz_rollingMessages;
};
// item is missin - this really is pointless but it aint broke so dont fix it
@@ -297,7 +296,7 @@ _position = getPosATL _object;
_actionBuildHidden = true;
_actionCancel = player addAction [localize "str_player_build_cancel", "\z\addons\dayz_code\actions\object_build.sqf", [_object, _requiredParts, _classname, _text, false, 0, "none"], 1, true, true, "", "0 != count Dayz_constructionContext"];
while {dayz_actionInProgress and Dayz_constructionContext select 4} do {
while {Dayz_constructionContext select 4} do {
// force the angle so that the ghost is showing always the same side
_angleRef=Dayz_constructionContext select 1;