Skip to content

Commit 216852f

Browse files
committed
Update ArtilleryStateMachine (onState => onStateEntered)
1 parent ada89d9 commit 216852f

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

addons/sup_artillery/ArtilleryStateMachine.hpp

+17-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class ArtilleryStateMachine {
2-
list = "";
2+
list = "ALIVE_sup_artillery_stateMachine_list";
33

44
class Idle {
55
onState = "";
@@ -14,8 +14,8 @@ class ArtilleryStateMachine {
1414
};
1515

1616
class Active {
17-
onState = "[_this, 'onActive'] call ALIVE_fnc_artillery";
18-
onStateEntered = "";
17+
onState = "";
18+
onStateEntered = "[_this, 'onActive'] call ALIVE_fnc_artillery";
1919
onStateLeaving = "";
2020

2121
class InRange {
@@ -32,8 +32,8 @@ class ArtilleryStateMachine {
3232
};
3333

3434
class Move {
35-
onState = "[_this, 'onMove'] call ALIVE_fnc_artillery";
36-
onStateEntered = "";
35+
onState = "";
36+
onStateEntered = "[_this, 'onMove'] call ALIVE_fnc_artillery";
3737
onStateLeaving = "";
3838

3939
class InPosition {
@@ -50,10 +50,16 @@ class ArtilleryStateMachine {
5050
};
5151

5252
class Execute {
53-
onState = "[_this, 'onExecute'] call ALIVE_fnc_artillery";
54-
onStateEntered = "";
53+
onState = "";
54+
onStateEntered = "[_this, 'onExecute'] call ALIVE_fnc_artillery";
5555
onStateLeaving = "";
5656

57+
class Fire {
58+
targetState = "Fire";
59+
condition = "[_this, 'fireNextRound'] call ALIVE_fnc_artillery";
60+
onTransition = "";
61+
};
62+
5763
class Abort {
5864
targetState = "ReturnToBase";
5965
condition = "!([_this, 'hasFireMission'] call ALIVE_fnc_artillery)";
@@ -62,8 +68,8 @@ class ArtilleryStateMachine {
6268
};
6369

6470
class Fire {
65-
onState = "[_this, 'onFire'] call ALIVE_fnc_artillery";
66-
onStateEntered = "";
71+
onState = "";
72+
onStateEntered = "[_this, 'onFire'] call ALIVE_fnc_artillery";
6773
onStateLeaving = "";
6874

6975
class FireMissionComplete {
@@ -92,8 +98,8 @@ class ArtilleryStateMachine {
9298
};
9399

94100
class ReturnToBase {
95-
onState = "[_this, 'onReturnToBase'] call ALIVE_fnc_artillery";
96-
onStateEntered = "";
101+
onState = "";
102+
onStateEntered = "[_this, 'onReturnToBase'] call ALIVE_fnc_artillery";
97103
onStateLeaving = "";
98104

99105
class AtBase {

0 commit comments

Comments
 (0)