Skip to content

Commit 5bc3ee7

Browse files
committed
Maintenance - Cleaned up blank spaces in PIR code
Issue ID: N/A
1 parent be11240 commit 5bc3ee7

18 files changed

+446
-508
lines changed

addons/PiR/functions/BendsDown.sqf

+27-29
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if (!isServer) exitWith {};
1+
if (!isServer) exitWith {};
22

33
_unit = _this select 0;
44
_anim = _this select 1;
@@ -18,81 +18,81 @@ _unit setcaptive true;
1818

1919
IF (alive _unit) then {
2020

21-
_numberOfKits = {"FirstAidKit" == _x} count (items _unit);
22-
[_unit, "firstaidkit"] remoteExec ["removeItems", 0];
23-
21+
_numberOfKits = {"FirstAidKit" == _x} count (items _unit);
22+
[_unit, "firstaidkit"] remoteExec ["removeItems", 0];
23+
2424
_stanceu = 0;
2525
IF ("STAND" == stance _unit ) then {
26-
[_unit,(selectRandom ["AinvPknlMstpSlayWrflDnon_healed", "AinvPknlMstpSlayWrflDnon_healed2"])] remoteExec ["playMove", 0];
26+
[_unit,(selectRandom ["AinvPknlMstpSlayWrflDnon_healed", "AinvPknlMstpSlayWrflDnon_healed2"])] remoteExec ["playMove", 0];
2727
_stanceu = 1;
2828
} ELSE {
2929
IF ("CROUCH" == stance _unit ) then {
3030
_stanceu = 2;
31-
[_unit,"AmovPknlMstpSrasWrflDnon_AinvPknlMstpSlayWrflDnon"] remoteExec ["switchMove", 0];
31+
[_unit,"AmovPknlMstpSrasWrflDnon_AinvPknlMstpSlayWrflDnon"] remoteExec ["switchMove", 0];
3232
sleep 0.76;
3333
[_unit,(selectRandom ["AinvPknlMstpSlayWrflDnon_healed", "AinvPknlMstpSlayWrflDnon_healed2"])] remoteExec ["switchMove", 0];
3434
} ELSE {
3535
IF ("PRONE" == stance _unit ) then {
36-
[_unit,"AmovPpneMstpSrasWrflDnon_healed"] remoteExec ["playMove", 0];
36+
[_unit,"AmovPpneMstpSrasWrflDnon_healed"] remoteExec ["playMove", 0];
3737
} ELSE {
3838
IF ("UNDEFINED" == stance _unit ) then {
39-
[_unit,(selectRandom ["AinvPknlMstpSlayWrflDnon_healed", "AinvPknlMstpSlayWrflDnon_healed2"])] remoteExec ["playMove", 0];
39+
[_unit,(selectRandom ["AinvPknlMstpSlayWrflDnon_healed", "AinvPknlMstpSlayWrflDnon_healed2"])] remoteExec ["playMove", 0];
4040
};
4141
};
4242
};
4343
};
4444

4545

46-
waitUntil { sleep 0.1; ((AnimationState _unit == "AinvPknlMstpSlayWrflDnon_healed") or (AnimationState _unit == "AinvPknlMstpSlayWrflDnon_healed2") or (AnimationState _unit == "AmovPpneMstpSrasWrflDnon_healed") or (!alive _unit))
46+
waitUntil { sleep 0.1; ((AnimationState _unit == "AinvPknlMstpSlayWrflDnon_healed") or (AnimationState _unit == "AinvPknlMstpSlayWrflDnon_healed2") or (AnimationState _unit == "AmovPpneMstpSrasWrflDnon_healed") or (!alive _unit))
4747
};
48-
sleep (3 + (random 2));
48+
sleep (3 + (random 2));
4949
IF (!alive _unit) exitWith {
5050
_unit setVariable ["dam_ignore_injured0",false];
5151
};
5252

53-
54-
//__________________________________________________________Выход_______________________________________________________________
53+
54+
//__________________________________________________________Выход_______________________________________________________________
5555

5656
IF (_numberOfKits > 0 ) then {
5757
for "_i" from 1 to _numberOfKits do { _unit addItem "FirstAidKit"};
5858
};
5959

60-
IF (alive _unit) then {
60+
IF (alive _unit) then {
6161
IF ((_shans - (random 15)) >=0) then {
62-
IF ((_shans - (random 18)) >=0) then {
62+
IF ((_shans - (random 18)) >=0) then {
6363
[_unit,"AmovPknlMstpSrasWrflDnon_AmovPpneMstpSrasWrflDnon"] remoteExec ["switchMove", 0];
64-
sleep 0.05;
64+
sleep 0.05;
6565
_null = [_unit, _anim, _shans, _shooter] spawn Crawl;
66-
67-
} ELSE {
66+
67+
} ELSE {
6868
[_unit,"AmovPknlMstpSrasWrflDnon_AmovPpneMstpSrasWrflDnon"] remoteExec ["switchMove", 0];
6969
sleep 0.05;
7070
_null = [_unit, _anim, _shans, _shooter] spawn Uncondition;
7171

7272
};
7373

7474
} ELSE {
75-
76-
waitUntil { sleep 0.1; (((AnimationState _unit != "AinvPknlMstpSlayWrflDnon_healed") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon_healed2") && (AnimationState _unit != "AmovPpneMstpSrasWrflDnon_healed")) or (!alive _unit))
75+
76+
waitUntil { sleep 0.1; (((AnimationState _unit != "AinvPknlMstpSlayWrflDnon_healed") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon_healed2") && (AnimationState _unit != "AmovPpneMstpSrasWrflDnon_healed")) or (!alive _unit))
7777
};
7878

79-
IF (_stanceu == 1) then {
79+
IF (_stanceu == 1) then {
8080
[_unit,"AinvPknlMstpSlayWrflDnon_AmovPercMstpSrasWrflDnon"] remoteExec ["switchMove", 0];
81-
waitUntil { sleep 0.1; (((AnimationState _unit != "AinvPknlMstpSlayWrflDnon_AmovPercMstpSrasWrflDnon") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon_AmovPknlMstpSrasWrflDnon") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon_1") && (AnimationState _unit != "AmovPknlMstpSrasWrflDnon_AinvPknlMstpSlayWrflDnon")) or (!alive _unit))
81+
waitUntil { sleep 0.1; (((AnimationState _unit != "AinvPknlMstpSlayWrflDnon_AmovPercMstpSrasWrflDnon") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon_AmovPknlMstpSrasWrflDnon") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon_1") && (AnimationState _unit != "AmovPknlMstpSrasWrflDnon_AinvPknlMstpSlayWrflDnon")) or (!alive _unit))
8282
};
8383
[_unit,"AmovPercMstpSrasWrflDnon"] remoteExec ["switchMove", 0];
84-
84+
8585
};
8686
IF (_stanceu == 2) then {
8787
[_unit,"AinvPknlMstpSlayWrflDnon_AmovPknlMstpSrasWrflDnon"] remoteExec ["switchMove", 0];
88-
waitUntil { sleep 0.1; (((AnimationState _unit != "AinvPknlMstpSlayWrflDnon_AmovPercMstpSrasWrflDnon") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon_AmovPknlMstpSrasWrflDnon") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon_1") && (AnimationState _unit != "AmovPknlMstpSrasWrflDnon_AinvPknlMstpSlayWrflDnon")) or (!alive _unit))
89-
};
88+
waitUntil { sleep 0.1; (((AnimationState _unit != "AinvPknlMstpSlayWrflDnon_AmovPercMstpSrasWrflDnon") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon_AmovPknlMstpSrasWrflDnon") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon_1") && (AnimationState _unit != "AmovPknlMstpSrasWrflDnon_AinvPknlMstpSlayWrflDnon")) or (!alive _unit))
89+
};
9090
IF ("STAND" == stance _unit ) then {
9191
[_unit,"AmovPercMstpSrasWrflDnon"] remoteExec ["switchMove", 0];
9292
} Else {
9393
[_unit,"AmovPknlMstpSrasWrflDnon"] remoteExec ["switchMove", 0];
9494
};
95-
95+
9696
};
9797
_unit setVariable ["dam_ignore_injured0",false];
9898

@@ -104,10 +104,8 @@ _stanceu = 0;
104104
IF !(PiR_captive_on) then {
105105
_unit setcaptive false;
106106
};
107-
};
107+
};
108108
};
109-
//_______________________________________________________________________________________________________________________________
109+
//_______________________________________________________________________________________________________________________________
110110

111111
};
112-
113-

addons/PiR/functions/BendsDown0.sqf

+27-27
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if (!isServer) exitWith {};
1+
if (!isServer) exitWith {};
22

33
_unit = _this select 0;
44
_anim = _this select 1;
@@ -18,75 +18,75 @@ _unit setcaptive true;
1818

1919
IF (alive _unit) then {
2020

21-
_numberOfKits = {"FirstAidKit" == _x} count (items _unit);
22-
[_unit, "firstaidkit"] remoteExec ["removeItems", 0];
21+
_numberOfKits = {"FirstAidKit" == _x} count (items _unit);
22+
[_unit, "firstaidkit"] remoteExec ["removeItems", 0];
2323

2424
_stanceu = 0;
2525
IF ("STAND" == stance _unit ) then {
26-
[_unit,(selectRandom ["AinvPknlMstpSlayWrflDnon_healed", "AinvPknlMstpSlayWrflDnon_healed2"])] remoteExec ["playMove", 0];
26+
[_unit,(selectRandom ["AinvPknlMstpSlayWrflDnon_healed", "AinvPknlMstpSlayWrflDnon_healed2"])] remoteExec ["playMove", 0];
2727
_stanceu = 1;
2828
} ELSE {
2929
IF ("CROUCH" == stance _unit ) then {
3030
_stanceu = 2;
31-
[_unit,"AmovPknlMstpSrasWrflDnon_AinvPknlMstpSlayWrflDnon"] remoteExec ["switchMove", 0];
31+
[_unit,"AmovPknlMstpSrasWrflDnon_AinvPknlMstpSlayWrflDnon"] remoteExec ["switchMove", 0];
3232
sleep 0.76;
3333
[_unit,(selectRandom ["AinvPknlMstpSlayWrflDnon_healed", "AinvPknlMstpSlayWrflDnon_healed2"])] remoteExec ["switchMove", 0];
3434
} ELSE {
3535
IF ("PRONE" == stance _unit ) then {
36-
[_unit,"AmovPpneMstpSrasWrflDnon_healed"] remoteExec ["playMove", 0];
36+
[_unit,"AmovPpneMstpSrasWrflDnon_healed"] remoteExec ["playMove", 0];
3737
} ELSE {
3838
IF ("UNDEFINED" == stance _unit ) then {
39-
[_unit,(selectRandom ["AinvPknlMstpSlayWrflDnon_healed", "AinvPknlMstpSlayWrflDnon_healed2"])] remoteExec ["playMove", 0];
39+
[_unit,(selectRandom ["AinvPknlMstpSlayWrflDnon_healed", "AinvPknlMstpSlayWrflDnon_healed2"])] remoteExec ["playMove", 0];
4040
};
4141
};
4242
};
4343
};
4444

4545

46-
waitUntil { sleep 0.1; ((AnimationState _unit == "AinvPknlMstpSlayWrflDnon_healed") or (AnimationState _unit == "AinvPknlMstpSlayWrflDnon_healed2") or (AnimationState _unit == "AmovPpneMstpSrasWrflDnon_healed") or (!alive _unit))
46+
waitUntil { sleep 0.1; ((AnimationState _unit == "AinvPknlMstpSlayWrflDnon_healed") or (AnimationState _unit == "AinvPknlMstpSlayWrflDnon_healed2") or (AnimationState _unit == "AmovPpneMstpSrasWrflDnon_healed") or (!alive _unit))
4747
};
48-
sleep (3 + (random 2));
48+
sleep (3 + (random 2));
4949
IF (!alive _unit) exitWith {
5050
_unit setVariable ["dam_ignore_injured0",false,true];
5151
};
5252

53-
54-
//__________________________________________________________Выход_______________________________________________________________
55-
53+
54+
//__________________________________________________________Выход_______________________________________________________________
55+
5656
IF (_numberOfKits > 0 ) then {
5757
for "_i" from 1 to _numberOfKits do { _unit addItem "FirstAidKit"};
5858
};
5959

6060
IF (alive _unit) then {
6161
IF ((_shans - (random 15)) >=0) then {
62-
IF ((_shans - (random 18)) >=0) then {
62+
IF ((_shans - (random 18)) >=0) then {
6363
[_unit,"AmovPknlMstpSrasWrflDnon_AmovPpneMstpSrasWrflDnon"] remoteExec ["switchMove", 0];
6464
sleep 0.05;
6565
_null = [_unit, _anim, _shans, _shooter] spawn Crawl0;
66-
67-
} ELSE {
66+
67+
} ELSE {
6868
[_unit,"AmovPknlMstpSrasWrflDnon_AmovPpneMstpSrasWrflDnon"] remoteExec ["switchMove", 0];
6969
sleep 0.05;
7070
_null = [_unit, _anim, _shans, _shooter] spawn Uncondition0;
7171

7272
};
7373

7474
} ELSE {
75-
76-
waitUntil { sleep 0.1; (((AnimationState _unit != "AinvPknlMstpSlayWrflDnon_healed") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon_healed2") && (AnimationState _unit != "AmovPpneMstpSrasWrflDnon_healed")) or (!alive _unit))
75+
76+
waitUntil { sleep 0.1; (((AnimationState _unit != "AinvPknlMstpSlayWrflDnon_healed") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon_healed2") && (AnimationState _unit != "AmovPpneMstpSrasWrflDnon_healed")) or (!alive _unit))
7777
};
78-
79-
IF (_stanceu == 1) then {
78+
79+
IF (_stanceu == 1) then {
8080
[_unit,"AinvPknlMstpSlayWrflDnon_AmovPercMstpSrasWrflDnon"] remoteExec ["switchMove", 0];
81-
waitUntil { sleep 0.1; (((AnimationState _unit != "AinvPknlMstpSlayWrflDnon_AmovPercMstpSrasWrflDnon") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon_AmovPknlMstpSrasWrflDnon") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon_1") && (AnimationState _unit != "AmovPknlMstpSrasWrflDnon_AinvPknlMstpSlayWrflDnon")) or (!alive _unit))
81+
waitUntil { sleep 0.1; (((AnimationState _unit != "AinvPknlMstpSlayWrflDnon_AmovPercMstpSrasWrflDnon") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon_AmovPknlMstpSrasWrflDnon") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon_1") && (AnimationState _unit != "AmovPknlMstpSrasWrflDnon_AinvPknlMstpSlayWrflDnon")) or (!alive _unit))
8282
};
8383
[_unit,"AmovPercMstpSrasWrflDnon"] remoteExec ["switchMove", 0];
84-
84+
8585
};
8686
IF (_stanceu == 2) then {
8787
[_unit,"AinvPknlMstpSlayWrflDnon_AmovPknlMstpSrasWrflDnon"] remoteExec ["switchMove", 0];
88-
waitUntil { sleep 0.1; (((AnimationState _unit != "AinvPknlMstpSlayWrflDnon_AmovPercMstpSrasWrflDnon") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon_AmovPknlMstpSrasWrflDnon") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon_1") && (AnimationState _unit != "AmovPknlMstpSrasWrflDnon_AinvPknlMstpSlayWrflDnon")) or (!alive _unit))
89-
};
88+
waitUntil { sleep 0.1; (((AnimationState _unit != "AinvPknlMstpSlayWrflDnon_AmovPercMstpSrasWrflDnon") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon_AmovPknlMstpSrasWrflDnon") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon") && (AnimationState _unit != "AinvPknlMstpSlayWrflDnon_1") && (AnimationState _unit != "AmovPknlMstpSrasWrflDnon_AinvPknlMstpSlayWrflDnon")) or (!alive _unit))
89+
};
9090
IF ("STAND" == stance _unit ) then {
9191
[_unit,"AmovPercMstpSrasWrflDnon"] remoteExec ["switchMove", 0];
9292
} Else {
@@ -104,18 +104,18 @@ _stanceu = 0;
104104
_unit setcaptive false;
105105
};
106106

107-
};
107+
};
108108
};
109-
//_______________________________________________________________________________________________________________________________
109+
//_______________________________________________________________________________________________________________________________
110110

111111
};
112112

113113
IF !(alive _unit) then {
114114
_unit setVariable ["dam_ignore_injured0",false,true];
115-
_unit setVariable ["dam_ignore_hit0",false];
115+
_unit setVariable ["dam_ignore_hit0",false];
116116

117117
IF !(PiR_captive_on) then {
118118
_unit setcaptive false;
119119
};
120120

121-
};
121+
};

0 commit comments

Comments
 (0)