mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2025-03-14 02:16:10 +00:00
Quickfix for infinite shield
This commit is contained in:
parent
c3db5a74ac
commit
1c827df52a
1 changed files with 16 additions and 0 deletions
|
@ -213,6 +213,22 @@ unsafe fn handle_attack(lua_state: u64) {
|
|||
unsafe fn mod_handle_attack(lua_state: u64) {
|
||||
let mut l2c_agent = L2CAgent::new(lua_state);
|
||||
|
||||
// necessary if param object fails
|
||||
// hacky way of forcing no shield damage on all hitboxes
|
||||
if MENU.shield_state == Shield::Infinite {
|
||||
let hitbox_params: Vec<L2CValue> =
|
||||
(0..36).map(|i| l2c_agent.pop_lua_stack(i + 1)).collect();
|
||||
l2c_agent.clear_lua_stack();
|
||||
for i in 0..36 {
|
||||
let mut x = hitbox_params[i];
|
||||
if i == 20 {
|
||||
l2c_agent.push_lua_stack(&mut L2CValue::new_num(-999.0));
|
||||
} else {
|
||||
l2c_agent.push_lua_stack(&mut x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Hitbox Visualization
|
||||
if MENU.hitbox_vis == HitboxVisualization::On {
|
||||
// get all necessary grabbox params
|
||||
|
|
Loading…
Add table
Reference in a new issue