1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-11-24 10:54:16 +00:00

Add training mode check to hitbox display

This commit is contained in:
jam1garner 2019-03-26 23:29:14 -04:00
parent c763b3704a
commit 1032430b18

View file

@ -60,6 +60,11 @@ void __attribute__((weak)) NORETURN __libnx_exit(int rc)
__nx_exit(0, orig_saved_lr);
}
uint64_t is_training_mode() {
u8 *modeByte_71066b5720 = IMPORT(0x71066b5720);
return (*modeByte_71066b5720 == 0xC) || (*modeByte_71066b5720 == 0x20);
}
void _ZN3app10sv_animcmd6ATTACKEP9lua_State_replace(__int64_t a1) {
// Stretched bones fix: Scale down by ModelModule::scale() with lua_State arg of bone?
@ -113,6 +118,7 @@ void _ZN3app10sv_animcmd6ATTACKEP9lua_State_replace(__int64_t a1) {
sub_71019420D0(*(__int64_t *)(*(__int64_t *)(a1 - 8) + 416LL), a1);
// EFFECT_FOLLOW_COLOR(Graphic, Bone, Z, Y, X, ZRot, YRot, XRot, Size, unknown=0x1, Red, Green, Blue)
if (is_training_mode()){
float sizeMult = 19.0 / 200.0;
Hash40 shieldEffectHash = {.hash = 0xAFAE75F05LL};
@ -158,6 +164,7 @@ void _ZN3app10sv_animcmd6ATTACKEP9lua_State_replace(__int64_t a1) {
lib_L2CAgent_push_lua_stack(&l2c_agent, &blue);
app_sv_animcmd_EFFECT_FOLLOW_COLOR(l2c_agent.lua_state_agent);
}
}
// clear_lua_stack section
v2 = *(__int64_t *)(v1 + 16);