SHARE
TWEET

Untitled

a guest Jun 24th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Nyx's edge cancel code, place above void __attribute__((weak)) NORETURN __libnx_exit(int rc) in main.cpp
  2. __int64_t init_settings_fix_edges(__int64_t module_accessor,uint32_t param_2,int param_3,uint param_4, uint32_t param_5,bool param_6,int param_7,int param_8,int param_9,int param_10){
  3.  
  4.     u64 status_module = load_module(module_accessor, 0x40);
  5.     u64 (*init_settings)(u64, u64, uint, u64, u64, uint, uint, uint) =
  6.     (u64 (*)(u64, u64, uint, u64, u64, uint, uint, uint))(load_module_impl(status_module, 0x110));
  7.     u8 category = (u8)(*(u32*)(param_1 + 8) >> 28);
  8.  
  9.     if (category == BATTLE_OBJECT_CATEGORY_FIGHTER) {
  10.         switch (StatusModule::status_kind(module_accessor)) {
  11.             case FIGHTER_STATUS_KIND_WAIT:
  12.             case FIGHTER_STATUS_KIND_TURN:
  13.             case FIGHTER_STATUS_KIND_SQUAT:
  14.             case FIGHTER_STATUS_KIND_SQUAT_WAIT:
  15.             case FIGHTER_STATUS_KIND_SQUAT_F:
  16.             case FIGHTER_STATUS_KIND_SQUAT_B:
  17.             case FIGHTER_STATUS_KIND_SQUAT_RV:
  18.             case FIGHTER_STATUS_KIND_LANDING:
  19.             case FIGHTER_STATUS_KIND_LIGHT:
  20.             case FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR:
  21.             case FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL:
  22.             case FIGHTER_STATUS_KIND_LANDING_DAMAGE_LIGHT:
  23.             case FIGHTER_STATUS_KIND_GUARD_ON:
  24.             case FIGHTER_STATUS_KIND_GUARD:
  25.             case FIGHTER_STATUS_KIND_GUARD_DAMAGE:
  26.             case FIGHTER_STATUS_KIND_ESCAPE_AIR:
  27.             case FIGHTER_STATUS_KIND_ESCAPE_AIR_SLIDE:
  28.             //case FIGHTER_STATUS_KIND_DAMAGE:
  29.             case FIGHTER_STATUS_KIND_OTTOTO:
  30.             case FIGHTER_STATUS_KIND_OTTOTO_WAIT:
  31.                     fix = 1;
  32.                     break;
  33.                 fix = 1;
  34.                
  35.         }
  36.     }
  37.  
  38.   //ORIGINAL CALL
  39.   return init_settings(status_module,(__int64_t)situation_kind,(__int64_t)(uint)param_3,
  40.    fix,(__int64_t)param_5,(__int64_t)((uint)param_6 & 1),
  41.    (__int64_t)(uint)param_7,(__int64_t)(uint)param_8);
  42.  
  43. }
  44.  
  45.  
  46.     // Place in main.cpp in the int main() function underneath SaltySD_function_replace_sym("_ZN3lib8L2CAgent15clear_lua_stackEv", (u64) &clear_lua_stack_replace);
  47.     SaltySD_function_replace_sym("_ZN3app8lua_bind32StatusModule__init_settings_implEPNS_26BattleObjectModuleAccessorENS_13SituationKindEijNS_20GroundCliffCheckKindEbiiii", (u64) &init_settings_fix_edges);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top