Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Silver-like Hover Action
- if (GameState == 4)
- {
- can_hover = 0;
- Gauge = 10000;
- is_hovering = false;
- MetalHoverTimer = 0;
- }
- if (GameState == 15)
- {
- 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))
- {
- ++can_hover;
- if (Gauge > 0 && can_hover > 1)
- {
- if (ControllerPointers[0]->PressedButtons & Buttons_A)
- {
- co2->PhysicsData.HangTime = 0;
- is_hovering = true;
- co2->Speed.y = 0.0;
- can_hover = 0;
- co1->Action = 8;
- co2->AnimationThing.Index == 16;
- }
- }
- }
- else can_hover = 0;
- if (is_hovering)
- {
- if (co2->AnimationThing.Index == 17)
- {
- ++MetalHoverTimer;
- if (MetalHoverTimer < 3)
- {
- ((AnimData_t*)0x3C56210)[17].AnimationSpeed = 7;
- }
- else if (MetalHoverTimer >= 3 && MetalHoverTimer < 40)
- {
- ((AnimData_t*)0x3C56210)[17].AnimationSpeed = 0.025;
- }
- else if (MetalHoverTimer / 40 % 2 == 0)
- {
- ((AnimData_t*)0x3C56210)[17].AnimationSpeed = -0.025;
- }
- else if (MetalHoverTimer / 40 % 2 == 1)
- {
- ((AnimData_t*)0x3C56210)[17].AnimationSpeed = 0.025;
- }
- }
- WriteData((void*)0x43CC72, 0x90, 6); //Allow gravity change
- co2->PhysicsData.Gravity = 0.0;
- //co1->Action = 12;
- if (co2->Speed.x == 0.0)
- {
- if (anim_was_17)
- {
- co2->AnimationThing.Index = 16;
- anim_was_17 = false;
- }
- else if (co2->AnimationThing.Index != 17)
- {
- co2->AnimationThing.Index = 17;
- }
- }
- //else if (co2->Speed.x > 0.0)
- //{
- // co2->AnimationThing.Index = 146;
- //}
- if (ControllerPointers[0]->HeldButtons & Buttons_Left || ControllerPointers[0]->HeldButtons & Buttons_Right || ControllerPointers[0]->HeldButtons & Buttons_Up || ControllerPointers[0]->HeldButtons & Buttons_Down)
- {
- if (co2->Speed.x < 2.0)
- co2->Speed.x += 0.2;
- }
- else
- {
- if (co2->Speed.x > 0.0)
- co2->Speed.x -= 0.2;
- }
- }
- else
- {
- ((AnimData_t*)0x3C56210)[17].AnimationSpeed = 1;
- WriteData((void*)0x43CC72, gravity_orig_hovering);
- //if (co2->_struct_a3.ColFlagsA & ColFlags_Water)
- //{
- // co2->PhysicsData.Gravity = 0.032;
- //}
- //else co2->PhysicsData.Gravity = 0.08;
- co2->PhysicsData.Gravity = 0.08;
- MetalHoverTimer = 0;
- ((AnimData_t*)0x3C56210)[17].AnimationSpeed = 1;
- if (co2->AnimationThing.Index == 17) anim_was_17 = true;
- else anim_was_17 = false;
- }
- if (is_hovering && (!(ControllerPointers[0]->HeldButtons & Buttons_A) || Gauge <= 0))
- {
- is_hovering = false;
- co1->Action = 12;
- }
- }
- //Removes the gravity change underwater ***********************************************************************************************************************************************
- if (is_hovering)
- {
- WriteData((void*)0x43CBC9, 0x90, 6);
- co1->Status &= ~Status_Ball;
- co1->Status &= ~Status_Attack;
- }
- else
- {
- WriteData((void*)0x43CBC9, gravity_underwater_orig_hovering);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement