Advertisement
Benji23245

Untitled

Apr 2nd, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.82 KB | None | 0 0
  1. //Silver-like Hover Action
  2. if (GameState == 4)
  3. {
  4. can_hover = 0;
  5. Gauge = 10000;
  6. is_hovering = false;
  7. MetalHoverTimer = 0;
  8. }
  9. if (GameState == 15)
  10. {
  11. if ((co1->Status & Status_Ground) != Status_Ground && !is_hovering && (co2->AnimationThing.Index != 0 || co2->AnimationThing.Index != 1 || co2->AnimationThing.Index != 2 || co2->AnimationThing.Index != 3 || co2->AnimationThing.Index != 4 || co2->AnimationThing.Index != 5 || co2->AnimationThing.Index != 6 || co2->AnimationThing.Index != 7 || co2->AnimationThing.Index != 8 || co2->AnimationThing.Index != 9 || co2->AnimationThing.Index != 10 || co2->AnimationThing.Index != 11 || co2->AnimationThing.Index != 12 || co2->AnimationThing.Index != 13 || co2->AnimationThing.Index != 64 || co2->AnimationThing.Index != 146 || co2->AnimationThing.Index != 20 || co2->AnimationThing.Index != 25 || co2->AnimationThing.Index != 31 || co2->AnimationThing.Index != 44 || co2->AnimationThing.Index != 45 || co2->AnimationThing.Index != 71))
  12. {
  13. ++can_hover;
  14. if (Gauge > 0 && can_hover > 1)
  15. {
  16. if (ControllerPointers[0]->PressedButtons & Buttons_A)
  17. {
  18. co2->PhysicsData.HangTime = 0;
  19. is_hovering = true;
  20. co2->Speed.y = 0.0;
  21. can_hover = 0;
  22. co1->Action = 8;
  23. co2->AnimationThing.Index == 16;
  24. }
  25. }
  26. }
  27. else can_hover = 0;
  28. if (is_hovering)
  29. {
  30.  
  31.  
  32.  
  33. if (co2->AnimationThing.Index == 17)
  34. {
  35. ++MetalHoverTimer;
  36. if (MetalHoverTimer < 3)
  37. {
  38. ((AnimData_t*)0x3C56210)[17].AnimationSpeed = 7;
  39. }
  40. else if (MetalHoverTimer >= 3 && MetalHoverTimer < 40)
  41. {
  42. ((AnimData_t*)0x3C56210)[17].AnimationSpeed = 0.025;
  43. }
  44. else if (MetalHoverTimer / 40 % 2 == 0)
  45. {
  46. ((AnimData_t*)0x3C56210)[17].AnimationSpeed = -0.025;
  47. }
  48. else if (MetalHoverTimer / 40 % 2 == 1)
  49. {
  50. ((AnimData_t*)0x3C56210)[17].AnimationSpeed = 0.025;
  51. }
  52.  
  53. }
  54.  
  55.  
  56.  
  57.  
  58.  
  59. WriteData((void*)0x43CC72, 0x90, 6); //Allow gravity change
  60. co2->PhysicsData.Gravity = 0.0;
  61. //co1->Action = 12;
  62. if (co2->Speed.x == 0.0)
  63. {
  64. if (anim_was_17)
  65. {
  66. co2->AnimationThing.Index = 16;
  67. anim_was_17 = false;
  68. }
  69. else if (co2->AnimationThing.Index != 17)
  70. {
  71. co2->AnimationThing.Index = 17;
  72. }
  73. }
  74. //else if (co2->Speed.x > 0.0)
  75. //{
  76. // co2->AnimationThing.Index = 146;
  77. //}
  78. if (ControllerPointers[0]->HeldButtons & Buttons_Left || ControllerPointers[0]->HeldButtons & Buttons_Right || ControllerPointers[0]->HeldButtons & Buttons_Up || ControllerPointers[0]->HeldButtons & Buttons_Down)
  79. {
  80. if (co2->Speed.x < 2.0)
  81. co2->Speed.x += 0.2;
  82. }
  83. else
  84. {
  85. if (co2->Speed.x > 0.0)
  86. co2->Speed.x -= 0.2;
  87. }
  88. }
  89. else
  90. {
  91. ((AnimData_t*)0x3C56210)[17].AnimationSpeed = 1;
  92. WriteData((void*)0x43CC72, gravity_orig_hovering);
  93. //if (co2->_struct_a3.ColFlagsA & ColFlags_Water)
  94. //{
  95. // co2->PhysicsData.Gravity = 0.032;
  96. //}
  97. //else co2->PhysicsData.Gravity = 0.08;
  98. co2->PhysicsData.Gravity = 0.08;
  99. MetalHoverTimer = 0;
  100. ((AnimData_t*)0x3C56210)[17].AnimationSpeed = 1;
  101. if (co2->AnimationThing.Index == 17) anim_was_17 = true;
  102. else anim_was_17 = false;
  103. }
  104. if (is_hovering && (!(ControllerPointers[0]->HeldButtons & Buttons_A) || Gauge <= 0))
  105. {
  106. is_hovering = false;
  107. co1->Action = 12;
  108. }
  109. }
  110.  
  111.  
  112. //Removes the gravity change underwater ***********************************************************************************************************************************************
  113. if (is_hovering)
  114. {
  115. WriteData((void*)0x43CBC9, 0x90, 6);
  116. co1->Status &= ~Status_Ball;
  117. co1->Status &= ~Status_Attack;
  118. }
  119. else
  120. {
  121. WriteData((void*)0x43CBC9, gravity_underwater_orig_hovering);
  122. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement