1
1
2
2
use super :: * ;
3
- # [ acmd_script ( agent = "duckhunt" , script = "game_attackdash" , category = ACMD_GAME , low_priority ) ]
4
- unsafe fn duckhunt_attackdash_game ( fighter : & mut L2CAgentBase ) {
3
+
4
+ unsafe extern "C" fn duckhunt_attackdash_game ( fighter : & mut L2CAgentBase ) {
5
5
let lua_state = fighter. lua_state_agent ;
6
6
let boma = fighter. boma ( ) ;
7
7
sv_kinetic_energy ! ( set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION , 0.8 ) ;
@@ -28,8 +28,8 @@ unsafe fn duckhunt_attackdash_game(fighter: &mut L2CAgentBase) {
28
28
}
29
29
30
30
31
- # [ acmd_script ( agent = "duckhunt" , script = "game_attack11" , category = ACMD_GAME , low_priority ) ]
32
- unsafe fn duckhunt_attack_11_game ( fighter : & mut L2CAgentBase ) {
31
+
32
+ unsafe extern "C" fn duckhunt_attack_11_game ( fighter : & mut L2CAgentBase ) {
33
33
let lua_state = fighter. lua_state_agent ;
34
34
let boma = fighter. boma ( ) ;
35
35
@@ -55,8 +55,8 @@ unsafe fn duckhunt_attack_11_game(fighter: &mut L2CAgentBase) {
55
55
}
56
56
57
57
58
- # [ acmd_script ( agent = "duckhunt" , script = "game_attack12" , category = ACMD_GAME , low_priority ) ]
59
- unsafe fn duckhunt_attack_12_game ( fighter : & mut L2CAgentBase ) {
58
+
59
+ unsafe extern "C" fn duckhunt_attack_12_game ( fighter : & mut L2CAgentBase ) {
60
60
let lua_state = fighter. lua_state_agent ;
61
61
let boma = fighter. boma ( ) ;
62
62
frame ( lua_state, 5.0 ) ;
@@ -79,8 +79,8 @@ unsafe fn duckhunt_attack_12_game(fighter: &mut L2CAgentBase) {
79
79
}
80
80
}
81
81
82
- # [ acmd_script ( agent = "duckhunt" , script = "game_attack13" , category = ACMD_GAME , low_priority ) ]
83
- unsafe fn duckhunt_attack_13_game ( fighter : & mut L2CAgentBase ) {
82
+
83
+ unsafe extern "C" fn duckhunt_attack_13_game ( fighter : & mut L2CAgentBase ) {
84
84
let lua_state = fighter. lua_state_agent ;
85
85
let boma = fighter. boma ( ) ;
86
86
frame ( lua_state, 6.0 ) ;
@@ -95,8 +95,8 @@ unsafe fn duckhunt_attack_13_game(fighter: &mut L2CAgentBase) {
95
95
}
96
96
}
97
97
98
- # [ acmd_script ( agent = "duckhunt" , script = "game_attack100sub" , category = ACMD_GAME , low_priority ) ]
99
- unsafe fn duckhunt_attack_100_sub_game ( fighter : & mut L2CAgentBase ) {
98
+
99
+ unsafe extern "C" fn duckhunt_attack_100_sub_game ( fighter : & mut L2CAgentBase ) {
100
100
let lua_state = fighter. lua_state_agent ;
101
101
let boma = fighter. boma ( ) ;
102
102
if is_excute ( fighter) {
@@ -114,8 +114,8 @@ unsafe fn duckhunt_attack_100_sub_game(fighter: &mut L2CAgentBase) {
114
114
}
115
115
}
116
116
117
- # [ acmd_script ( agent = "duckhunt" , script = "game_attack100end" , category = ACMD_GAME , low_priority ) ]
118
- unsafe fn duckhunt_attack_100_end_game ( fighter : & mut L2CAgentBase ) {
117
+
118
+ unsafe extern "C" fn duckhunt_attack_100_end_game ( fighter : & mut L2CAgentBase ) {
119
119
let lua_state = fighter. lua_state_agent ;
120
120
let boma = fighter. boma ( ) ;
121
121
frame ( lua_state, 1.0 ) ;
@@ -135,14 +135,16 @@ unsafe fn duckhunt_attack_100_end_game(fighter: &mut L2CAgentBase) {
135
135
}
136
136
}
137
137
138
+
139
+
140
+
138
141
pub fn install ( ) {
139
- install_acmd_scripts ! (
140
- duckhunt_attackdash_game ,
141
- duckhunt_attack_11_game ,
142
- duckhunt_attack_12_game ,
143
- duckhunt_attack_13_game ,
144
- duckhunt_attack_100_sub_game ,
145
- duckhunt_attack_100_end_game ,
146
- ) ;
142
+ smashline :: Agent :: new ( "duckhunt" )
143
+ . acmd ( "game_attackdash" , duckhunt_attackdash_game )
144
+ . acmd ( "game_attack11" , duckhunt_attack_11_game )
145
+ . acmd ( "game_attack12" , duckhunt_attack_12_game )
146
+ . acmd ( "game_attack13" , duckhunt_attack_13_game )
147
+ . acmd ( "game_attack100sub" , duckhunt_attack_100_sub_game )
148
+ . acmd ( "game_attack100end" , duckhunt_attack_100_end_game )
149
+ . install ( ) ;
147
150
}
148
-
0 commit comments