Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Sonic/Super/Hyper Boost (FINAL)*************************************************************if speed == 8.0 still to do !!!!!!!!
- if (co2 == NULL) return;
- if (GetCharacterObject(0) && GetCharacterID(0) == Characters_Sonic && MetalSonicFlag == 0)
- {
- if (GameState == 15)
- {
- if (co2->gap5C[0] & 2)
- {
- WriteJump((void*)0x55E7A8, (void*)0x55E7C0);
- WriteJump((void*)0x55EEBF, (void*)0x55EEDA);
- //if (!auraobj)
- //{
- // WriteJump((void*)0x55E6F5, (void*)0x55E78A);
- // auraobj = LoadObject(LoadObj_Data1, 2, Sonic_SuperAura_Load);
- // NoBoost_OnWater = true;
- //}
- }
- else// if ((!(co2->gap5C[0] & 2)) || (co2->gap5C[0] & 2 && (co2->Speed.x <= 7.5 || CharObj1Ptrs[0]->Action == 8)))
- {
- WriteData((void*)0x55E7A8, SuperSplashData);
- WriteData((void*)0x55EEBF, SuperSplashScale);
- //WriteData((void*)0x55E6F5, SuperSplashAura);
- //NoBoost_OnWater = false;
- }
- if (!auraobj)
- {
- if (SpeedShoesCount == 0)
- {
- if (!is_hyper)
- {
- if (!is_super)
- {
- co2->PhysicsData.MaxAccel = 3.5;
- co2->PhysicsData.GroundAccel = 0.05;
- co2->PhysicsData.field_68 = -0.4275;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 7.25;
- co2->PhysicsData.GroundAccel = 0.075;
- co2->PhysicsData.field_68 = 0.0;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- }
- else
- {
- co2->PhysicsData.MaxAccel = 10.5;
- co2->PhysicsData.GroundAccel = 0.125;
- co2->PhysicsData.field_68 = 0.0;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- }
- if (SpeedShoesCount > 0)
- {
- if (!is_hyper)
- {
- if (!is_super)
- {
- co2->PhysicsData.MaxAccel = 7.0;
- co2->PhysicsData.GroundAccel = 0.1;
- co2->PhysicsData.field_68 = -0.8550;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 11.25;
- co2->PhysicsData.GroundAccel = 0.15;
- co2->PhysicsData.field_68 = 0.0;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- }
- else
- {
- co2->PhysicsData.MaxAccel = 15;
- co2->PhysicsData.GroundAccel = 0.25;
- co2->PhysicsData.field_68 = 0.0;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- }
- //if (!is_hyper)
- //{
- // if (!is_super)
- // {
- // if (co2->PhysicsData.MaxAccel == 8.0)
- // {
- // co2->PhysicsData.MaxAccel = 3.5;
- // co2->PhysicsData.GroundAccel = 0.05;
- // co2->PhysicsData.field_68 = -0.4275;
- // co2->PhysicsData.GroundDecel = -0.06;
- // }
- // }
- // else if (co2->PhysicsData.MaxAccel == 11.5)
- // {
- // co2->PhysicsData.MaxAccel = 6.0;
- // co2->PhysicsData.GroundAccel = 0.075;
- // co2->PhysicsData.field_68 = 0.0;
- // co2->PhysicsData.GroundDecel = -0.06;
- // }
- //}
- //else if (co2->PhysicsData.MaxAccel == 8.0)
- //{
- // co2->PhysicsData.MaxAccel = 10.0;
- // co2->PhysicsData.GroundAccel = 0.125;
- // co2->PhysicsData.field_68 = 0.0;
- // co2->PhysicsData.GroundDecel = -0.06;
- //}
- }
- WriteData((void*)0x55E95C, 0x90, 6);//nop the supersonic flag forever
- //if (auraobj && !NoBoost_OnWater)
- if (auraobj && CharObj1Ptrs[0]->Action != 6)
- {
- trailobj = LoadObject(LoadObj_Data1, 6, SonicDashTrail_Init);
- trailobj->Data1->CharIndex = 0;
- co2->PhysicsData.AirDecel = -0.015;
- WriteData((char*)0x496EF6, (char)0xEB);
- }
- else
- {
- WriteData((char*)0x496EF6, (char)0x74);
- }
- if (*(float**)0x55E6FA == &Boost_SuperTornado)
- {
- if (FOV < 120)
- {
- FOV += 5;
- }
- co1->Status |= Status_Ball;
- co1->Status |= Status_Attack;
- WriteData((void*)0x496EF8, 0x90, 3);
- WriteData((void*)0x494AF9, 0x90, 5);
- WriteData((void*)0x44FABF, 0x90, 6);//always ring attraction
- WriteData((float**)0x44FAFF, &ringdist);//attract rings from further
- WriteData((float*)0x44FBBA, ringdist);//attract rings from further 2
- WriteData((float**)0x44FBCE, &ringmaxspeed);
- WriteData((float*)0x44FBDD, ringmaxspeed);
- WriteData((float**)0x44FBC4, &ringaccel);
- WriteData((float**)0x44FC2A, &ringspeedmultiplier);
- if (co2->UnderwaterTime == 0)
- {
- WriteData((void*)0x4496E1, 0x90, 6);
- }
- else if (co2->Speed.x <= 7.5 || CharObj1Ptrs[0]->Action == 8)
- {
- WriteData((void*)0x4496E1, WalkOnWaterData);
- }
- }
- else
- {
- if (FOV > 70)
- {
- FOV -= 5;
- }
- if (co2->Speed.x <= 7.5 || CharObj1Ptrs[0]->Action == 8)
- {
- WriteData((void*)0x4496E1, WalkOnWaterData);
- }
- WriteData((void*)0x496EF8, SpindashData);
- WriteData((void*)0x44FABF, always_attract_rings_unNOP);
- WriteData((float**)0x44FAFF, (float*)0x7DD574);
- WriteData((float*)0x44FBBA, 50.0f);
- WriteData((float**)0x44FBC4, (float*)0x7E05C4);
- WriteData((float**)0x44FBCE, (float*)0x7DCCFC);
- WriteData((float*)0x44FBDD, 5.0f);
- WriteData((float**)0x44FC2A, (float*)0x7DCC98);
- }
- njSetPerspective(NJM_DEG_ANG(FOV));
- if (SpeedShoesCount == 0)
- {
- if ((co1->Status & Status_Ground) == Status_Ground)
- {
- was_on_ground = true;
- air_boost_used = false;
- if (CharObj1Ptrs[0]->Action != 4 && CharObj1Ptrs[0]->Action != 5 && CharObj1Ptrs[0]->Action != 6 && CharObj1Ptrs[0]->Action != 14 && CharObj1Ptrs[0]->Action != 23 && CharObj1Ptrs[0]->Action != 44 && CharObj1Ptrs[0]->Action != 16 && CharObj1Ptrs[0]->Action != 86 && CharObj1Ptrs[0]->Action != 20 && CharObj1Ptrs[0]->Action != 50 && CharObj1Ptrs[0]->Action != 15 && CharObj1Ptrs[0]->Action != 18 && CharObj1Ptrs[0]->Action != 21 && CharObj1Ptrs[0]->Action != 22 && CharObj1Ptrs[0]->Action != 23 && CharObj1Ptrs[0]->Action != 24 && CharObj1Ptrs[0]->Action != 25 && CharObj1Ptrs[0]->Action != 26 && CharObj1Ptrs[0]->Action != 27 && CharObj1Ptrs[0]->Action != 28 && CharObj1Ptrs[0]->Action != 29 && CharObj1Ptrs[0]->Action != 33 && CharObj1Ptrs[0]->Action != 34 && CharObj1Ptrs[0]->Action != 35 && CharObj1Ptrs[0]->Action != 36 && CharObj1Ptrs[0]->Action != 37 && CharObj1Ptrs[0]->Action != 38 && CharObj1Ptrs[0]->Action != 40 && CharObj1Ptrs[0]->Action != 41 && CharObj1Ptrs[0]->Action != 43 && CharObj1Ptrs[0]->Action != 45 && CharObj1Ptrs[0]->Action != 47 && CharObj1Ptrs[0]->Action != 55 && CharObj1Ptrs[0]->Action != 56 && CharObj1Ptrs[0]->Action != 57 && CharObj1Ptrs[0]->Action != 58 && CharObj1Ptrs[0]->Action != 59 && CharObj1Ptrs[0]->Action != 60 && CharObj1Ptrs[0]->Action != 61 && CharObj1Ptrs[0]->Action != 62 && CharObj1Ptrs[0]->Action != 65 && CharObj1Ptrs[0]->Action != 66 && CharObj1Ptrs[0]->Action != 67 && CharObj1Ptrs[0]->Action != 68 && CharObj1Ptrs[0]->Action != 69 && CharObj1Ptrs[0]->Action != 70 && CharObj1Ptrs[0]->Action != 72 && CharObj1Ptrs[0]->Action != 74 && CharObj1Ptrs[0]->Action != 83 && CharObj1Ptrs[0]->Action != 85 && CharObj1Ptrs[0]->Action != 87)
- {
- if (ControllerPointers[0]->PressedButtons & Buttons_Z)
- {
- Z_was_pressed_on_ground = true;
- //PlaySound(766, 0, 0, 0);
- PlayVoice(1316);
- if (boostvoice == 0)
- {
- PlaySound(BoostVoices[rand() % 3], 0, 0, 0);
- boostvoice = 1;
- }
- if (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)
- {
- CharObj1Ptrs[0]->Action = 2;
- }
- }
- if (ControllerPointers[0]->PressedButtons & Buttons_Z && CharObj1Ptrs[0]->Action != 4 && CharObj1Ptrs[0]->Action != 16 && CharObj1Ptrs[0]->Action != 86 && CharObj1Ptrs[0]->Action != 20 && CharObj1Ptrs[0]->Action != 50 && CharObj1Ptrs[0]->Action != 15 && CharObj1Ptrs[0]->Action != 18 && CharObj1Ptrs[0]->Action != 21 && CharObj1Ptrs[0]->Action != 22 && CharObj1Ptrs[0]->Action != 23 && CharObj1Ptrs[0]->Action != 24 && CharObj1Ptrs[0]->Action != 25 && CharObj1Ptrs[0]->Action != 26 && CharObj1Ptrs[0]->Action != 27 && CharObj1Ptrs[0]->Action != 28 && CharObj1Ptrs[0]->Action != 29 && CharObj1Ptrs[0]->Action != 33 && CharObj1Ptrs[0]->Action != 34 && CharObj1Ptrs[0]->Action != 35 && CharObj1Ptrs[0]->Action != 36 && CharObj1Ptrs[0]->Action != 37 && CharObj1Ptrs[0]->Action != 38 && CharObj1Ptrs[0]->Action != 40 && CharObj1Ptrs[0]->Action != 41 && CharObj1Ptrs[0]->Action != 43 && CharObj1Ptrs[0]->Action != 45 && CharObj1Ptrs[0]->Action != 47 && CharObj1Ptrs[0]->Action != 55 && CharObj1Ptrs[0]->Action != 56 && CharObj1Ptrs[0]->Action != 57 && CharObj1Ptrs[0]->Action != 58 && CharObj1Ptrs[0]->Action != 59 && CharObj1Ptrs[0]->Action != 60 && CharObj1Ptrs[0]->Action != 61 && CharObj1Ptrs[0]->Action != 62 && CharObj1Ptrs[0]->Action != 65 && CharObj1Ptrs[0]->Action != 66 && CharObj1Ptrs[0]->Action != 67 && CharObj1Ptrs[0]->Action != 68 && CharObj1Ptrs[0]->Action != 69 && CharObj1Ptrs[0]->Action != 70 && CharObj1Ptrs[0]->Action != 72 && CharObj1Ptrs[0]->Action != 74 && CharObj1Ptrs[0]->Action != 83 && CharObj1Ptrs[0]->Action != 85 && CharObj1Ptrs[0]->Action != 87)
- {
- if (!is_hyper)
- {
- if (!is_super)
- {
- if (co2->Speed.x <= 9.0)
- {
- co2->Speed.x = 9.0;
- }
- }
- else if (co2->Speed.x <= 12.0)
- {
- co2->Speed.x = 12.0;
- }
- }
- else
- {
- if (co2->Speed.x <= 14.5)
- {
- co2->Speed.x = 14.5;
- }
- }
- }
- if (ControllerPointers[0]->HeldButtons & Buttons_Z && (Z_was_pressed_in_air || Z_was_pressed_on_ground) && CharObj1Ptrs[0]->Action != 16 && CharObj1Ptrs[0]->Action != 86 && CharObj1Ptrs[0]->Action != 20 && CharObj1Ptrs[0]->Action != 50)
- {
- WriteData((float**)0x55E6FA, &Boost_SuperTornado);
- if (!auraobj) auraobj = LoadObject(LoadObj_Data1, 2, Sonic_SuperAura_Load);
- if (co2->Speed.x >= 8)
- {
- WriteData((short*)0x00495C27, (short)13);
- }
- else WriteData((short*)0x00495C27, (short)12);
- if (!is_hyper)
- {
- if (!is_super)
- {
- if (co2->Speed.x <= 6)
- {
- co2->PhysicsData.MaxAccel = 8.0;
- co2->PhysicsData.GroundAccel = 0.225;
- co2->PhysicsData.field_68 = 0;
- co2->PhysicsData.GroundDecel = 0.096;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 8.0;
- co2->PhysicsData.GroundAccel = 0.15;
- co2->PhysicsData.field_68 = 0;
- co2->PhysicsData.GroundDecel = 0.096;
- }
- }
- else
- {
- if (co2->Speed.x <= 9)
- {
- co2->PhysicsData.MaxAccel = 12.0;
- co2->PhysicsData.GroundAccel = 0.4;
- co2->PhysicsData.field_68 = 0;
- co2->PhysicsData.GroundDecel = 0.096;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 12.0;
- co2->PhysicsData.GroundAccel = 0.2;
- co2->PhysicsData.field_68 = 0;
- co2->PhysicsData.GroundDecel = 0.096;
- }
- }
- }
- else
- {
- if (co2->Speed.x <= 12)
- {
- co2->PhysicsData.MaxAccel = 17.0;
- co2->PhysicsData.GroundAccel = 0.5;
- co2->PhysicsData.field_68 = 0;
- co2->PhysicsData.GroundDecel = 0.096;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 17.0;
- co2->PhysicsData.GroundAccel = 0.25;
- co2->PhysicsData.field_68 = 0;
- co2->PhysicsData.GroundDecel = 0.096;
- }
- }
- }
- if (Z_was_pressed_on_ground)
- {
- if (!(ControllerPointers[0]->HeldButtons & Buttons_Z) || co2->Speed.x < 3 || CharObj1Ptrs[0]->Action == 4 || CharObj1Ptrs[0]->Action == 6)
- {
- WriteData((short*)0x00495C27, (short)12);
- Z_was_pressed_on_ground = false;
- Z_was_pressed_in_air = false;
- if (!NoBoost_OnWater)
- {
- DeleteObject_(auraobj);
- auraobj = nullptr;
- }
- DeleteObject_(trailobj);
- trailobj = nullptr;
- WriteData((float**)0x55E6FA, &SuperTornado);
- co1->Status &= ~Status_Ball;
- co1->Status &= ~Status_Attack;
- if (!is_hyper)
- {
- if (!is_super)
- {
- co2->PhysicsData.MaxAccel = 3.5;
- co2->PhysicsData.GroundAccel = 0.05;
- co2->PhysicsData.field_68 = -0.4275;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 7.25;
- co2->PhysicsData.GroundAccel = 0.075;
- co2->PhysicsData.field_68 = 0.0;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- }
- else
- {
- co2->PhysicsData.MaxAccel = 10.5;
- co2->PhysicsData.GroundAccel = 0.125;
- co2->PhysicsData.field_68 = 0.0;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- }
- }
- if (Z_was_pressed_in_air)
- {
- if (!(ControllerPointers[0]->HeldButtons & Buttons_Z) || co2->Speed.x < 3 || CharObj1Ptrs[0]->Action == 4 || CharObj1Ptrs[0]->Action == 6)
- {
- WriteData((short*)0x00495C27, (short)12);
- Z_was_pressed_in_air = false;
- was_on_ground = false;
- if (!NoBoost_OnWater)
- {
- DeleteObject_(auraobj);
- auraobj = nullptr;
- }
- DeleteObject_(trailobj);
- trailobj = nullptr;
- WriteData((float**)0x55E6FA, &SuperTornado);
- co1->Status &= ~Status_Ball;
- co1->Status &= ~Status_Attack;
- if (!is_hyper)
- {
- if (!is_super)
- {
- co2->PhysicsData.MaxAccel = 3.5;
- co2->PhysicsData.GroundAccel = 0.05;
- co2->PhysicsData.field_68 = -0.4275;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 7.25;
- co2->PhysicsData.GroundAccel = 0.075;
- co2->PhysicsData.field_68 = 0.0;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- }
- else
- {
- co2->PhysicsData.MaxAccel = 10.5;
- co2->PhysicsData.GroundAccel = 0.125;
- co2->PhysicsData.field_68 = 0.0;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- }
- }
- }
- }
- if ((co1->Status & Status_Ground) != Status_Ground && (co2->AnimationThing.Index != 0 || co2->AnimationThing.Index != 1 || co2->AnimationThing.Index != 2 || co2->AnimationThing.Index != 9 || co2->AnimationThing.Index != 10 || co2->AnimationThing.Index != 11 || co2->AnimationThing.Index != 12 || co2->AnimationThing.Index != 13 || co2->AnimationThing.Index != 31))
- {
- if (CharObj1Ptrs[0]->Action != 6 && CharObj1Ptrs[0]->Action != 14 && CharObj1Ptrs[0]->Action != 23 && CharObj1Ptrs[0]->Action != 44 && CharObj1Ptrs[0]->Action != 16 && CharObj1Ptrs[0]->Action != 86 && CharObj1Ptrs[0]->Action != 20 && CharObj1Ptrs[0]->Action != 50 && CharObj1Ptrs[0]->Action != 15 && CharObj1Ptrs[0]->Action != 18 && CharObj1Ptrs[0]->Action != 21 && CharObj1Ptrs[0]->Action != 22 && CharObj1Ptrs[0]->Action != 23 && CharObj1Ptrs[0]->Action != 24 && CharObj1Ptrs[0]->Action != 25 && CharObj1Ptrs[0]->Action != 26 && CharObj1Ptrs[0]->Action != 27 && CharObj1Ptrs[0]->Action != 28 && CharObj1Ptrs[0]->Action != 29 && CharObj1Ptrs[0]->Action != 33 && CharObj1Ptrs[0]->Action != 34 && CharObj1Ptrs[0]->Action != 35 && CharObj1Ptrs[0]->Action != 36 && CharObj1Ptrs[0]->Action != 37 && CharObj1Ptrs[0]->Action != 38 && CharObj1Ptrs[0]->Action != 40 && CharObj1Ptrs[0]->Action != 41 && CharObj1Ptrs[0]->Action != 43 && CharObj1Ptrs[0]->Action != 45 && CharObj1Ptrs[0]->Action != 47 && CharObj1Ptrs[0]->Action != 55 && CharObj1Ptrs[0]->Action != 56 && CharObj1Ptrs[0]->Action != 57 && CharObj1Ptrs[0]->Action != 58 && CharObj1Ptrs[0]->Action != 59 && CharObj1Ptrs[0]->Action != 60 && CharObj1Ptrs[0]->Action != 61 && CharObj1Ptrs[0]->Action != 62 && CharObj1Ptrs[0]->Action != 65 && CharObj1Ptrs[0]->Action != 66 && CharObj1Ptrs[0]->Action != 67 && CharObj1Ptrs[0]->Action != 68 && CharObj1Ptrs[0]->Action != 69 && CharObj1Ptrs[0]->Action != 70 && CharObj1Ptrs[0]->Action != 72 && CharObj1Ptrs[0]->Action != 74 && CharObj1Ptrs[0]->Action != 83 && CharObj1Ptrs[0]->Action != 85 && CharObj1Ptrs[0]->Action != 87)
- {
- if (ControllerPointers[0]->PressedButtons & Buttons_Z)
- {
- if (!air_boost_used)
- {
- PlayVoice(1316);
- if (boostvoice == 0)
- {
- PlaySound(BoostVoices[rand() % 3], 0, 0, 0);
- boostvoice = 1;
- }
- }
- Z_was_pressed_in_air = true;
- was_on_ground = false;
- }
- if (ControllerPointers[0]->PressedButtons & Buttons_Z && CharObj1Ptrs[0]->Action == 8 && CharObj1Ptrs[0]->Action != 16 && CharObj1Ptrs[0]->Action != 86 && CharObj1Ptrs[0]->Action != 20 && CharObj1Ptrs[0]->Action != 50 && CharObj1Ptrs[0]->Action != 15 && CharObj1Ptrs[0]->Action != 18 && CharObj1Ptrs[0]->Action != 21 && CharObj1Ptrs[0]->Action != 22 && CharObj1Ptrs[0]->Action != 23 && CharObj1Ptrs[0]->Action != 24 && CharObj1Ptrs[0]->Action != 25 && CharObj1Ptrs[0]->Action != 26 && CharObj1Ptrs[0]->Action != 27 && CharObj1Ptrs[0]->Action != 28 && CharObj1Ptrs[0]->Action != 29 && CharObj1Ptrs[0]->Action != 33 && CharObj1Ptrs[0]->Action != 34 && CharObj1Ptrs[0]->Action != 35 && CharObj1Ptrs[0]->Action != 36 && CharObj1Ptrs[0]->Action != 37 && CharObj1Ptrs[0]->Action != 38 && CharObj1Ptrs[0]->Action != 40 && CharObj1Ptrs[0]->Action != 41 && CharObj1Ptrs[0]->Action != 43 && CharObj1Ptrs[0]->Action != 45 && CharObj1Ptrs[0]->Action != 47 && CharObj1Ptrs[0]->Action != 55 && CharObj1Ptrs[0]->Action != 56 && CharObj1Ptrs[0]->Action != 57 && CharObj1Ptrs[0]->Action != 58 && CharObj1Ptrs[0]->Action != 59 && CharObj1Ptrs[0]->Action != 60 && CharObj1Ptrs[0]->Action != 61 && CharObj1Ptrs[0]->Action != 62 && CharObj1Ptrs[0]->Action != 65 && CharObj1Ptrs[0]->Action != 66 && CharObj1Ptrs[0]->Action != 67 && CharObj1Ptrs[0]->Action != 68 && CharObj1Ptrs[0]->Action != 69 && CharObj1Ptrs[0]->Action != 70 && CharObj1Ptrs[0]->Action != 72 && CharObj1Ptrs[0]->Action != 74 && CharObj1Ptrs[0]->Action != 83 && CharObj1Ptrs[0]->Action != 85 && CharObj1Ptrs[0]->Action != 87)
- {
- CharObj1Ptrs[0]->Action = 12;
- }
- if (!air_boost_used && ControllerPointers[0]->PressedButtons & Buttons_Z && CharObj1Ptrs[0]->Action != 16 && CharObj1Ptrs[0]->Action != 86 && CharObj1Ptrs[0]->Action != 20 && CharObj1Ptrs[0]->Action != 50 && CharObj1Ptrs[0]->Action != 15 && CharObj1Ptrs[0]->Action != 18 && CharObj1Ptrs[0]->Action != 21 && CharObj1Ptrs[0]->Action != 22 && CharObj1Ptrs[0]->Action != 23 && CharObj1Ptrs[0]->Action != 24 && CharObj1Ptrs[0]->Action != 25 && CharObj1Ptrs[0]->Action != 26 && CharObj1Ptrs[0]->Action != 27 && CharObj1Ptrs[0]->Action != 28 && CharObj1Ptrs[0]->Action != 29 && CharObj1Ptrs[0]->Action != 33 && CharObj1Ptrs[0]->Action != 34 && CharObj1Ptrs[0]->Action != 35 && CharObj1Ptrs[0]->Action != 36 && CharObj1Ptrs[0]->Action != 37 && CharObj1Ptrs[0]->Action != 38 && CharObj1Ptrs[0]->Action != 40 && CharObj1Ptrs[0]->Action != 41 && CharObj1Ptrs[0]->Action != 43 && CharObj1Ptrs[0]->Action != 45 && CharObj1Ptrs[0]->Action != 47 && CharObj1Ptrs[0]->Action != 55 && CharObj1Ptrs[0]->Action != 56 && CharObj1Ptrs[0]->Action != 57 && CharObj1Ptrs[0]->Action != 58 && CharObj1Ptrs[0]->Action != 59 && CharObj1Ptrs[0]->Action != 60 && CharObj1Ptrs[0]->Action != 61 && CharObj1Ptrs[0]->Action != 62 && CharObj1Ptrs[0]->Action != 65 && CharObj1Ptrs[0]->Action != 66 && CharObj1Ptrs[0]->Action != 67 && CharObj1Ptrs[0]->Action != 68 && CharObj1Ptrs[0]->Action != 69 && CharObj1Ptrs[0]->Action != 70 && CharObj1Ptrs[0]->Action != 72 && CharObj1Ptrs[0]->Action != 74 && CharObj1Ptrs[0]->Action != 83 && CharObj1Ptrs[0]->Action != 85 && CharObj1Ptrs[0]->Action != 87)
- {
- co2->AnimationThing.Index = 64;
- }
- if (!air_boost_used && ControllerPointers[0]->PressedButtons & Buttons_Z && CharObj1Ptrs[0]->Action != 16 && CharObj1Ptrs[0]->Action != 86 && CharObj1Ptrs[0]->Action != 20 && CharObj1Ptrs[0]->Action != 50 && CharObj1Ptrs[0]->Action != 15 && CharObj1Ptrs[0]->Action != 18 && CharObj1Ptrs[0]->Action != 21 && CharObj1Ptrs[0]->Action != 22 && CharObj1Ptrs[0]->Action != 23 && CharObj1Ptrs[0]->Action != 24 && CharObj1Ptrs[0]->Action != 25 && CharObj1Ptrs[0]->Action != 26 && CharObj1Ptrs[0]->Action != 27 && CharObj1Ptrs[0]->Action != 28 && CharObj1Ptrs[0]->Action != 29 && CharObj1Ptrs[0]->Action != 33 && CharObj1Ptrs[0]->Action != 34 && CharObj1Ptrs[0]->Action != 35 && CharObj1Ptrs[0]->Action != 36 && CharObj1Ptrs[0]->Action != 37 && CharObj1Ptrs[0]->Action != 38 && CharObj1Ptrs[0]->Action != 40 && CharObj1Ptrs[0]->Action != 41 && CharObj1Ptrs[0]->Action != 43 && CharObj1Ptrs[0]->Action != 45 && CharObj1Ptrs[0]->Action != 47 && CharObj1Ptrs[0]->Action != 55 && CharObj1Ptrs[0]->Action != 56 && CharObj1Ptrs[0]->Action != 57 && CharObj1Ptrs[0]->Action != 58 && CharObj1Ptrs[0]->Action != 59 && CharObj1Ptrs[0]->Action != 60 && CharObj1Ptrs[0]->Action != 61 && CharObj1Ptrs[0]->Action != 62 && CharObj1Ptrs[0]->Action != 65 && CharObj1Ptrs[0]->Action != 66 && CharObj1Ptrs[0]->Action != 67 && CharObj1Ptrs[0]->Action != 68 && CharObj1Ptrs[0]->Action != 69 && CharObj1Ptrs[0]->Action != 70 && CharObj1Ptrs[0]->Action != 72 && CharObj1Ptrs[0]->Action != 74 && CharObj1Ptrs[0]->Action != 83 && CharObj1Ptrs[0]->Action != 85 && CharObj1Ptrs[0]->Action != 87)
- {
- if (!is_hyper)
- {
- if (!is_super)
- {
- if (co2->Speed.x <= 10.0)
- {
- co2->Speed.x = 10.0;
- }
- }
- else if (co2->Speed.x <= 12.5)
- {
- co2->Speed.x = 12.5;
- }
- }
- else
- {
- if (co2->Speed.x <= 15.0)
- {
- co2->Speed.x = 15.0;
- }
- }
- }
- if (!air_boost_used && Z_was_pressed_in_air && ControllerPointers[0]->HeldButtons & Buttons_Z && CharObj1Ptrs[0]->Action != 16 && CharObj1Ptrs[0]->Action != 86 && CharObj1Ptrs[0]->Action != 20 && CharObj1Ptrs[0]->Action != 50)
- {
- WriteData((float**)0x55E6FA, &Boost_SuperTornado);
- if (!auraobj) auraobj = LoadObject(LoadObj_Data1, 2, Sonic_SuperAura_Load);
- WriteData((short*)0x00495C27, (short)13);
- if (!is_hyper)
- {
- if (!is_super)
- {
- if (co2->Speed.x <= 6)
- {
- co2->PhysicsData.MaxAccel = 8.0;
- co2->PhysicsData.GroundAccel = 0.225;
- co2->PhysicsData.field_68 = 0;
- co2->PhysicsData.GroundDecel = 0.096;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 8.0;
- co2->PhysicsData.GroundAccel = 0.15;
- co2->PhysicsData.field_68 = 0;
- co2->PhysicsData.GroundDecel = 0.096;
- }
- }
- else
- {
- if (co2->Speed.x <= 9)
- {
- co2->PhysicsData.MaxAccel = 12.0;
- co2->PhysicsData.GroundAccel = 0.4;
- co2->PhysicsData.field_68 = 0;
- co2->PhysicsData.GroundDecel = 0.096;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 12.0;
- co2->PhysicsData.GroundAccel = 0.2;
- co2->PhysicsData.field_68 = 0;
- co2->PhysicsData.GroundDecel = 0.096;
- }
- }
- }
- else
- {
- if (co2->Speed.x <= 12)
- {
- co2->PhysicsData.MaxAccel = 17.0;
- co2->PhysicsData.GroundAccel = 0.5;
- co2->PhysicsData.field_68 = 0;
- co2->PhysicsData.GroundDecel = 0.096;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 17.0;
- co2->PhysicsData.GroundAccel = 0.25;
- co2->PhysicsData.field_68 = 0;
- co2->PhysicsData.GroundDecel = 0.096;
- }
- }
- }
- if ((Z_was_pressed_on_ground && !(ControllerPointers[0]->HeldButtons & Buttons_Z)) || (Z_was_pressed_on_ground && (co2->Speed.x < 6.5 || CharObj1Ptrs[0]->Action == 6)))
- {
- WriteData((short*)0x00495C27, (short)12);
- Z_was_pressed_on_ground = false;
- if (!NoBoost_OnWater)
- {
- DeleteObject_(auraobj);
- auraobj = nullptr;
- }
- DeleteObject_(trailobj);
- trailobj = nullptr;
- WriteData((float**)0x55E6FA, &SuperTornado);
- co1->Status &= ~Status_Ball;
- co1->Status &= ~Status_Attack;
- if (!is_hyper)
- {
- if (!is_super)
- {
- co2->PhysicsData.MaxAccel = 3.5;
- co2->PhysicsData.GroundAccel = 0.05;
- co2->PhysicsData.field_68 = -0.4275;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 7.25;
- co2->PhysicsData.GroundAccel = 0.075;
- co2->PhysicsData.field_68 = 0.0;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- }
- else
- {
- co2->PhysicsData.MaxAccel = 10.5;
- co2->PhysicsData.GroundAccel = 0.125;
- co2->PhysicsData.field_68 = 0.0;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- }
- if ((Z_was_pressed_in_air && !was_on_ground && (!(ControllerPointers[0]->HeldButtons & Buttons_Z) || co2->Speed.x < 8 || CharObj1Ptrs[0]->Action == 4 || CharObj1Ptrs[0]->Action == 6)))
- {
- WriteData((short*)0x00495C27, (short)12);
- Z_was_pressed_in_air = false;
- air_boost_used = true;
- if (!NoBoost_OnWater)
- {
- DeleteObject_(auraobj);
- auraobj = nullptr;
- }
- DeleteObject_(trailobj);
- trailobj = nullptr;
- WriteData((float**)0x55E6FA, &SuperTornado);
- co1->Status &= ~Status_Ball;
- co1->Status &= ~Status_Attack;
- if (!is_hyper)
- {
- if (!is_super)
- {
- co2->PhysicsData.MaxAccel = 3.5;
- co2->PhysicsData.GroundAccel = 0.05;
- co2->PhysicsData.field_68 = -0.4275;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 7.25;
- co2->PhysicsData.GroundAccel = 0.075;
- co2->PhysicsData.field_68 = 0.0;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- }
- else
- {
- co2->PhysicsData.MaxAccel = 10.5;
- co2->PhysicsData.GroundAccel = 0.125;
- co2->PhysicsData.field_68 = 0.0;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- }
- if ((Z_was_pressed_in_air && was_on_ground && (!(ControllerPointers[0]->HeldButtons & Buttons_Z) || co2->Speed.x < 6.5 || CharObj1Ptrs[0]->Action == 4 || CharObj1Ptrs[0]->Action == 6)))
- {
- WriteData((short*)0x00495C27, (short)12);
- if (!NoBoost_OnWater)
- {
- DeleteObject_(auraobj);
- auraobj = nullptr;
- }
- DeleteObject_(trailobj);
- trailobj = nullptr;
- Z_was_pressed_in_air = false;
- was_on_ground = false;
- WriteData((float**)0x55E6FA, &SuperTornado);
- co1->Status &= ~Status_Ball;
- co1->Status &= ~Status_Attack;
- if (!is_hyper)
- {
- if (!is_super)
- {
- co2->PhysicsData.MaxAccel = 3.5;
- co2->PhysicsData.GroundAccel = 0.05;
- co2->PhysicsData.field_68 = -0.4275;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 7.25;
- co2->PhysicsData.GroundAccel = 0.075;
- co2->PhysicsData.field_68 = 0.0;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- }
- else
- {
- co2->PhysicsData.MaxAccel = 10.5;
- co2->PhysicsData.GroundAccel = 0.125;
- co2->PhysicsData.field_68 = 0.0;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- }
- }
- }
- }
- if (SpeedShoesCount > 0)
- {
- if ((co1->Status & Status_Ground) == Status_Ground)
- {
- was_on_ground = true;
- air_boost_used = false;
- if (CharObj1Ptrs[0]->Action != 4 && CharObj1Ptrs[0]->Action != 5 && CharObj1Ptrs[0]->Action != 6 && CharObj1Ptrs[0]->Action != 14 && CharObj1Ptrs[0]->Action != 23 && CharObj1Ptrs[0]->Action != 44)
- {
- if (ControllerPointers[0]->PressedButtons & Buttons_Z && CharObj1Ptrs[0]->Action != 16 && CharObj1Ptrs[0]->Action != 86 && CharObj1Ptrs[0]->Action != 20 && CharObj1Ptrs[0]->Action != 50 && CharObj1Ptrs[0]->Action != 15 && CharObj1Ptrs[0]->Action != 18 && CharObj1Ptrs[0]->Action != 21 && CharObj1Ptrs[0]->Action != 22 && CharObj1Ptrs[0]->Action != 23 && CharObj1Ptrs[0]->Action != 24 && CharObj1Ptrs[0]->Action != 25 && CharObj1Ptrs[0]->Action != 26 && CharObj1Ptrs[0]->Action != 27 && CharObj1Ptrs[0]->Action != 28 && CharObj1Ptrs[0]->Action != 29 && CharObj1Ptrs[0]->Action != 33 && CharObj1Ptrs[0]->Action != 34 && CharObj1Ptrs[0]->Action != 35 && CharObj1Ptrs[0]->Action != 36 && CharObj1Ptrs[0]->Action != 37 && CharObj1Ptrs[0]->Action != 38 && CharObj1Ptrs[0]->Action != 40 && CharObj1Ptrs[0]->Action != 41 && CharObj1Ptrs[0]->Action != 43 && CharObj1Ptrs[0]->Action != 45 && CharObj1Ptrs[0]->Action != 47 && CharObj1Ptrs[0]->Action != 55 && CharObj1Ptrs[0]->Action != 56 && CharObj1Ptrs[0]->Action != 57 && CharObj1Ptrs[0]->Action != 58 && CharObj1Ptrs[0]->Action != 59 && CharObj1Ptrs[0]->Action != 60 && CharObj1Ptrs[0]->Action != 61 && CharObj1Ptrs[0]->Action != 62 && CharObj1Ptrs[0]->Action != 65 && CharObj1Ptrs[0]->Action != 66 && CharObj1Ptrs[0]->Action != 67 && CharObj1Ptrs[0]->Action != 68 && CharObj1Ptrs[0]->Action != 69 && CharObj1Ptrs[0]->Action != 70 && CharObj1Ptrs[0]->Action != 72 && CharObj1Ptrs[0]->Action != 74 && CharObj1Ptrs[0]->Action != 83 && CharObj1Ptrs[0]->Action != 85 && CharObj1Ptrs[0]->Action != 87)
- {
- Z_was_pressed_on_ground = true;
- //PlaySound(766, 0, 0, 0);
- PlayVoice(1316);
- if (boostvoice == 0)
- {
- PlaySound(BoostVoices[rand() % 3], 0, 0, 0);
- boostvoice = 1;
- }
- if (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)
- {
- CharObj1Ptrs[0]->Action = 2;
- }
- }
- if (ControllerPointers[0]->PressedButtons & Buttons_Z && CharObj1Ptrs[0]->Action != 4 && CharObj1Ptrs[0]->Action != 16 && CharObj1Ptrs[0]->Action != 86 && CharObj1Ptrs[0]->Action != 20 && CharObj1Ptrs[0]->Action != 50 && CharObj1Ptrs[0]->Action != 15 && CharObj1Ptrs[0]->Action != 18 && CharObj1Ptrs[0]->Action != 21 && CharObj1Ptrs[0]->Action != 22 && CharObj1Ptrs[0]->Action != 23 && CharObj1Ptrs[0]->Action != 24 && CharObj1Ptrs[0]->Action != 25 && CharObj1Ptrs[0]->Action != 26 && CharObj1Ptrs[0]->Action != 27 && CharObj1Ptrs[0]->Action != 28 && CharObj1Ptrs[0]->Action != 29 && CharObj1Ptrs[0]->Action != 33 && CharObj1Ptrs[0]->Action != 34 && CharObj1Ptrs[0]->Action != 35 && CharObj1Ptrs[0]->Action != 36 && CharObj1Ptrs[0]->Action != 37 && CharObj1Ptrs[0]->Action != 38 && CharObj1Ptrs[0]->Action != 40 && CharObj1Ptrs[0]->Action != 41 && CharObj1Ptrs[0]->Action != 43 && CharObj1Ptrs[0]->Action != 45 && CharObj1Ptrs[0]->Action != 47 && CharObj1Ptrs[0]->Action != 55 && CharObj1Ptrs[0]->Action != 56 && CharObj1Ptrs[0]->Action != 57 && CharObj1Ptrs[0]->Action != 58 && CharObj1Ptrs[0]->Action != 59 && CharObj1Ptrs[0]->Action != 60 && CharObj1Ptrs[0]->Action != 61 && CharObj1Ptrs[0]->Action != 62 && CharObj1Ptrs[0]->Action != 65 && CharObj1Ptrs[0]->Action != 66 && CharObj1Ptrs[0]->Action != 67 && CharObj1Ptrs[0]->Action != 68 && CharObj1Ptrs[0]->Action != 69 && CharObj1Ptrs[0]->Action != 70 && CharObj1Ptrs[0]->Action != 72 && CharObj1Ptrs[0]->Action != 74 && CharObj1Ptrs[0]->Action != 83 && CharObj1Ptrs[0]->Action != 85 && CharObj1Ptrs[0]->Action != 87)
- {
- if (!is_hyper)
- {
- if (!is_super)
- {
- if (co2->Speed.x <= 12.5)
- {
- co2->Speed.x = 12.5;
- }
- }
- else if (co2->Speed.x <= 16)
- {
- co2->Speed.x = 16;
- }
- }
- else
- {
- if (co2->Speed.x <= 21)
- {
- co2->Speed.x = 21;
- }
- }
- }
- if (ControllerPointers[0]->HeldButtons & Buttons_Z && (Z_was_pressed_in_air || Z_was_pressed_on_ground) && CharObj1Ptrs[0]->Action != 16 && CharObj1Ptrs[0]->Action != 86 && CharObj1Ptrs[0]->Action != 20 && CharObj1Ptrs[0]->Action != 50)
- {
- WriteData((float**)0x55E6FA, &Boost_SuperTornado);
- if (!auraobj) auraobj = LoadObject(LoadObj_Data1, 2, Sonic_SuperAura_Load);
- if (co2->Speed.x >= 8)
- {
- WriteData((short*)0x00495C27, (short)13);
- }
- else WriteData((short*)0x00495C27, (short)12);
- if (!is_hyper)
- {
- if (!is_super)
- {
- if (co2->Speed.x <= 6)
- {
- co2->PhysicsData.MaxAccel = 12.0;
- co2->PhysicsData.GroundAccel = 0.45;
- co2->PhysicsData.field_68 = 0;
- co2->PhysicsData.GroundDecel = 0.096;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 12.0;
- co2->PhysicsData.GroundAccel = 0.225;
- co2->PhysicsData.field_68 = 0;
- co2->PhysicsData.GroundDecel = 0.096;
- }
- }
- else
- {
- if (co2->Speed.x <= 9)
- {
- co2->PhysicsData.MaxAccel = 18.5;
- co2->PhysicsData.GroundAccel = 0.6;
- co2->PhysicsData.field_68 = 0;
- co2->PhysicsData.GroundDecel = 0.096;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 18.5;
- co2->PhysicsData.GroundAccel = 0.3;
- co2->PhysicsData.field_68 = 0;
- co2->PhysicsData.GroundDecel = 0.096;
- }
- }
- }
- else
- {
- if (co2->Speed.x <= 12)
- {
- co2->PhysicsData.MaxAccel = 25.5;
- co2->PhysicsData.GroundAccel = 0.75;
- co2->PhysicsData.field_68 = 0;
- co2->PhysicsData.GroundDecel = 0.096;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 25.5;
- co2->PhysicsData.GroundAccel = 0.375;
- co2->PhysicsData.field_68 = 0;
- co2->PhysicsData.GroundDecel = 0.096;
- }
- }
- }
- if (Z_was_pressed_on_ground)
- {
- if (!(ControllerPointers[0]->HeldButtons & Buttons_Z) || co2->Speed.x < 3 || CharObj1Ptrs[0]->Action == 4 || CharObj1Ptrs[0]->Action == 6)
- {
- WriteData((short*)0x00495C27, (short)12);
- Z_was_pressed_on_ground = false;
- Z_was_pressed_in_air = false;
- if (!NoBoost_OnWater)
- {
- DeleteObject_(auraobj);
- auraobj = nullptr;
- }
- DeleteObject_(trailobj);
- trailobj = nullptr;
- WriteData((float**)0x55E6FA, &SuperTornado);
- co1->Status &= ~Status_Ball;
- co1->Status &= ~Status_Attack;
- if (!is_hyper)
- {
- if (!is_super)
- {
- co2->PhysicsData.MaxAccel = 7.0;
- co2->PhysicsData.GroundAccel = 0.1;
- co2->PhysicsData.field_68 = -0.8550;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 11.25;
- co2->PhysicsData.GroundAccel = 0.15;
- co2->PhysicsData.field_68 = 0.0;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- }
- else
- {
- co2->PhysicsData.MaxAccel = 15;
- co2->PhysicsData.GroundAccel = 0.25;
- co2->PhysicsData.field_68 = 0.0;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- }
- }
- if (Z_was_pressed_in_air)
- {
- if (!(ControllerPointers[0]->HeldButtons & Buttons_Z) || co2->Speed.x < 3 || CharObj1Ptrs[0]->Action == 4 || CharObj1Ptrs[0]->Action == 6)
- {
- WriteData((short*)0x00495C27, (short)12);
- Z_was_pressed_in_air = false;
- was_on_ground = false;
- if (!NoBoost_OnWater)
- {
- DeleteObject_(auraobj);
- auraobj = nullptr;
- }
- DeleteObject_(trailobj);
- trailobj = nullptr;
- WriteData((float**)0x55E6FA, &SuperTornado);
- co1->Status &= ~Status_Ball;
- co1->Status &= ~Status_Attack;
- if (!is_hyper)
- {
- if (!is_super)
- {
- co2->PhysicsData.MaxAccel = 7.0;
- co2->PhysicsData.GroundAccel = 0.1;
- co2->PhysicsData.field_68 = -0.8550;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 11.25;
- co2->PhysicsData.GroundAccel = 0.15;
- co2->PhysicsData.field_68 = 0.0;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- }
- else
- {
- co2->PhysicsData.MaxAccel = 15;
- co2->PhysicsData.GroundAccel = 0.25;
- co2->PhysicsData.field_68 = 0.0;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- }
- }
- }
- }
- if ((co1->Status & Status_Ground) != Status_Ground && (co2->AnimationThing.Index != 0 || co2->AnimationThing.Index != 1 || co2->AnimationThing.Index != 2 || co2->AnimationThing.Index != 9 || co2->AnimationThing.Index != 10 || co2->AnimationThing.Index != 11 || co2->AnimationThing.Index != 12 || co2->AnimationThing.Index != 13 || co2->AnimationThing.Index != 31))
- {
- if (CharObj1Ptrs[0]->Action != 6 && CharObj1Ptrs[0]->Action != 14 && CharObj1Ptrs[0]->Action != 23 && CharObj1Ptrs[0]->Action != 44)
- {
- if (ControllerPointers[0]->PressedButtons & Buttons_Z && CharObj1Ptrs[0]->Action != 16 && CharObj1Ptrs[0]->Action != 86 && CharObj1Ptrs[0]->Action != 20 && CharObj1Ptrs[0]->Action != 50 && CharObj1Ptrs[0]->Action != 15 && CharObj1Ptrs[0]->Action != 18 && CharObj1Ptrs[0]->Action != 21 && CharObj1Ptrs[0]->Action != 22 && CharObj1Ptrs[0]->Action != 23 && CharObj1Ptrs[0]->Action != 24 && CharObj1Ptrs[0]->Action != 25 && CharObj1Ptrs[0]->Action != 26 && CharObj1Ptrs[0]->Action != 27 && CharObj1Ptrs[0]->Action != 28 && CharObj1Ptrs[0]->Action != 29 && CharObj1Ptrs[0]->Action != 33 && CharObj1Ptrs[0]->Action != 34 && CharObj1Ptrs[0]->Action != 35 && CharObj1Ptrs[0]->Action != 36 && CharObj1Ptrs[0]->Action != 37 && CharObj1Ptrs[0]->Action != 38 && CharObj1Ptrs[0]->Action != 40 && CharObj1Ptrs[0]->Action != 41 && CharObj1Ptrs[0]->Action != 43 && CharObj1Ptrs[0]->Action != 45 && CharObj1Ptrs[0]->Action != 47 && CharObj1Ptrs[0]->Action != 55 && CharObj1Ptrs[0]->Action != 56 && CharObj1Ptrs[0]->Action != 57 && CharObj1Ptrs[0]->Action != 58 && CharObj1Ptrs[0]->Action != 59 && CharObj1Ptrs[0]->Action != 60 && CharObj1Ptrs[0]->Action != 61 && CharObj1Ptrs[0]->Action != 62 && CharObj1Ptrs[0]->Action != 65 && CharObj1Ptrs[0]->Action != 66 && CharObj1Ptrs[0]->Action != 67 && CharObj1Ptrs[0]->Action != 68 && CharObj1Ptrs[0]->Action != 69 && CharObj1Ptrs[0]->Action != 70 && CharObj1Ptrs[0]->Action != 72 && CharObj1Ptrs[0]->Action != 74 && CharObj1Ptrs[0]->Action != 83 && CharObj1Ptrs[0]->Action != 85 && CharObj1Ptrs[0]->Action != 87)
- {
- if (!air_boost_used)
- {
- PlayVoice(1316);
- if (boostvoice == 0)
- {
- PlaySound(BoostVoices[rand() % 3], 0, 0, 0);
- boostvoice = 1;
- }
- }
- Z_was_pressed_in_air = true;
- was_on_ground = false;
- }
- if (ControllerPointers[0]->PressedButtons & Buttons_Z && CharObj1Ptrs[0]->Action == 8 && CharObj1Ptrs[0]->Action != 16 && CharObj1Ptrs[0]->Action != 86 && CharObj1Ptrs[0]->Action != 20 && CharObj1Ptrs[0]->Action != 50 && CharObj1Ptrs[0]->Action != 15 && CharObj1Ptrs[0]->Action != 18 && CharObj1Ptrs[0]->Action != 21 && CharObj1Ptrs[0]->Action != 22 && CharObj1Ptrs[0]->Action != 23 && CharObj1Ptrs[0]->Action != 24 && CharObj1Ptrs[0]->Action != 25 && CharObj1Ptrs[0]->Action != 26 && CharObj1Ptrs[0]->Action != 27 && CharObj1Ptrs[0]->Action != 28 && CharObj1Ptrs[0]->Action != 29 && CharObj1Ptrs[0]->Action != 33 && CharObj1Ptrs[0]->Action != 34 && CharObj1Ptrs[0]->Action != 35 && CharObj1Ptrs[0]->Action != 36 && CharObj1Ptrs[0]->Action != 37 && CharObj1Ptrs[0]->Action != 38 && CharObj1Ptrs[0]->Action != 40 && CharObj1Ptrs[0]->Action != 41 && CharObj1Ptrs[0]->Action != 43 && CharObj1Ptrs[0]->Action != 45 && CharObj1Ptrs[0]->Action != 47 && CharObj1Ptrs[0]->Action != 55 && CharObj1Ptrs[0]->Action != 56 && CharObj1Ptrs[0]->Action != 57 && CharObj1Ptrs[0]->Action != 58 && CharObj1Ptrs[0]->Action != 59 && CharObj1Ptrs[0]->Action != 60 && CharObj1Ptrs[0]->Action != 61 && CharObj1Ptrs[0]->Action != 62 && CharObj1Ptrs[0]->Action != 65 && CharObj1Ptrs[0]->Action != 66 && CharObj1Ptrs[0]->Action != 67 && CharObj1Ptrs[0]->Action != 68 && CharObj1Ptrs[0]->Action != 69 && CharObj1Ptrs[0]->Action != 70 && CharObj1Ptrs[0]->Action != 72 && CharObj1Ptrs[0]->Action != 74 && CharObj1Ptrs[0]->Action != 83 && CharObj1Ptrs[0]->Action != 85 && CharObj1Ptrs[0]->Action != 87)
- {
- CharObj1Ptrs[0]->Action = 12;
- }
- if (!air_boost_used && ControllerPointers[0]->PressedButtons & Buttons_Z && CharObj1Ptrs[0]->Action != 16 && CharObj1Ptrs[0]->Action != 86 && CharObj1Ptrs[0]->Action != 20 && CharObj1Ptrs[0]->Action != 50 && CharObj1Ptrs[0]->Action != 15 && CharObj1Ptrs[0]->Action != 18 && CharObj1Ptrs[0]->Action != 21 && CharObj1Ptrs[0]->Action != 22 && CharObj1Ptrs[0]->Action != 23 && CharObj1Ptrs[0]->Action != 24 && CharObj1Ptrs[0]->Action != 25 && CharObj1Ptrs[0]->Action != 26 && CharObj1Ptrs[0]->Action != 27 && CharObj1Ptrs[0]->Action != 28 && CharObj1Ptrs[0]->Action != 29 && CharObj1Ptrs[0]->Action != 33 && CharObj1Ptrs[0]->Action != 34 && CharObj1Ptrs[0]->Action != 35 && CharObj1Ptrs[0]->Action != 36 && CharObj1Ptrs[0]->Action != 37 && CharObj1Ptrs[0]->Action != 38 && CharObj1Ptrs[0]->Action != 40 && CharObj1Ptrs[0]->Action != 41 && CharObj1Ptrs[0]->Action != 43 && CharObj1Ptrs[0]->Action != 45 && CharObj1Ptrs[0]->Action != 47 && CharObj1Ptrs[0]->Action != 55 && CharObj1Ptrs[0]->Action != 56 && CharObj1Ptrs[0]->Action != 57 && CharObj1Ptrs[0]->Action != 58 && CharObj1Ptrs[0]->Action != 59 && CharObj1Ptrs[0]->Action != 60 && CharObj1Ptrs[0]->Action != 61 && CharObj1Ptrs[0]->Action != 62 && CharObj1Ptrs[0]->Action != 65 && CharObj1Ptrs[0]->Action != 66 && CharObj1Ptrs[0]->Action != 67 && CharObj1Ptrs[0]->Action != 68 && CharObj1Ptrs[0]->Action != 69 && CharObj1Ptrs[0]->Action != 70 && CharObj1Ptrs[0]->Action != 72 && CharObj1Ptrs[0]->Action != 74 && CharObj1Ptrs[0]->Action != 83 && CharObj1Ptrs[0]->Action != 85 && CharObj1Ptrs[0]->Action != 87)
- {
- co2->AnimationThing.Index = 64;
- }
- if (!air_boost_used && ControllerPointers[0]->PressedButtons & Buttons_Z && CharObj1Ptrs[0]->Action != 16 && CharObj1Ptrs[0]->Action != 86 && CharObj1Ptrs[0]->Action != 20 && CharObj1Ptrs[0]->Action != 50 && CharObj1Ptrs[0]->Action != 15 && CharObj1Ptrs[0]->Action != 18 && CharObj1Ptrs[0]->Action != 21 && CharObj1Ptrs[0]->Action != 22 && CharObj1Ptrs[0]->Action != 23 && CharObj1Ptrs[0]->Action != 24 && CharObj1Ptrs[0]->Action != 25 && CharObj1Ptrs[0]->Action != 26 && CharObj1Ptrs[0]->Action != 27 && CharObj1Ptrs[0]->Action != 28 && CharObj1Ptrs[0]->Action != 29 && CharObj1Ptrs[0]->Action != 33 && CharObj1Ptrs[0]->Action != 34 && CharObj1Ptrs[0]->Action != 35 && CharObj1Ptrs[0]->Action != 36 && CharObj1Ptrs[0]->Action != 37 && CharObj1Ptrs[0]->Action != 38 && CharObj1Ptrs[0]->Action != 40 && CharObj1Ptrs[0]->Action != 41 && CharObj1Ptrs[0]->Action != 43 && CharObj1Ptrs[0]->Action != 45 && CharObj1Ptrs[0]->Action != 47 && CharObj1Ptrs[0]->Action != 55 && CharObj1Ptrs[0]->Action != 56 && CharObj1Ptrs[0]->Action != 57 && CharObj1Ptrs[0]->Action != 58 && CharObj1Ptrs[0]->Action != 59 && CharObj1Ptrs[0]->Action != 60 && CharObj1Ptrs[0]->Action != 61 && CharObj1Ptrs[0]->Action != 62 && CharObj1Ptrs[0]->Action != 65 && CharObj1Ptrs[0]->Action != 66 && CharObj1Ptrs[0]->Action != 67 && CharObj1Ptrs[0]->Action != 68 && CharObj1Ptrs[0]->Action != 69 && CharObj1Ptrs[0]->Action != 70 && CharObj1Ptrs[0]->Action != 72 && CharObj1Ptrs[0]->Action != 74 && CharObj1Ptrs[0]->Action != 83 && CharObj1Ptrs[0]->Action != 85 && CharObj1Ptrs[0]->Action != 87)
- {
- if (!is_hyper)
- {
- if (!is_super)
- {
- if (co2->Speed.x <= 13.0)
- {
- co2->Speed.x = 13.0;
- }
- }
- else if (co2->Speed.x <= 16.5)
- {
- co2->Speed.x = 16.5;
- }
- }
- else
- {
- if (co2->Speed.x <= 21.5)
- {
- co2->Speed.x = 21.5;
- }
- }
- }
- if (!air_boost_used && Z_was_pressed_in_air && ControllerPointers[0]->HeldButtons & Buttons_Z && CharObj1Ptrs[0]->Action != 16 && CharObj1Ptrs[0]->Action != 86 && CharObj1Ptrs[0]->Action != 20 && CharObj1Ptrs[0]->Action != 50)
- {
- WriteData((float**)0x55E6FA, &Boost_SuperTornado);
- if (!auraobj) auraobj = LoadObject(LoadObj_Data1, 2, Sonic_SuperAura_Load);
- WriteData((short*)0x00495C27, (short)13);
- if (!is_hyper)
- {
- if (!is_super)
- {
- if (co2->Speed.x <= 6)
- {
- co2->PhysicsData.MaxAccel = 12.0;
- co2->PhysicsData.GroundAccel = 0.45;
- co2->PhysicsData.field_68 = 0;
- co2->PhysicsData.GroundDecel = 0.096;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 12.0;
- co2->PhysicsData.GroundAccel = 0.225;
- co2->PhysicsData.field_68 = 0;
- co2->PhysicsData.GroundDecel = 0.096;
- }
- }
- else
- {
- if (co2->Speed.x <= 9)
- {
- co2->PhysicsData.MaxAccel = 18.5;
- co2->PhysicsData.GroundAccel = 0.6;
- co2->PhysicsData.field_68 = 0;
- co2->PhysicsData.GroundDecel = 0.096;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 18.5;
- co2->PhysicsData.GroundAccel = 0.3;
- co2->PhysicsData.field_68 = 0;
- co2->PhysicsData.GroundDecel = 0.096;
- }
- }
- }
- else
- {
- if (co2->Speed.x <= 12)
- {
- co2->PhysicsData.MaxAccel = 25.5;
- co2->PhysicsData.GroundAccel = 0.75;
- co2->PhysicsData.field_68 = 0;
- co2->PhysicsData.GroundDecel = 0.096;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 25.5;
- co2->PhysicsData.GroundAccel = 0.375;
- co2->PhysicsData.field_68 = 0;
- co2->PhysicsData.GroundDecel = 0.096;
- }
- }
- }
- if ((Z_was_pressed_on_ground && !(ControllerPointers[0]->HeldButtons & Buttons_Z)) || (Z_was_pressed_on_ground && (co2->Speed.x < 6.5 || CharObj1Ptrs[0]->Action == 6)))
- {
- WriteData((short*)0x00495C27, (short)12);
- Z_was_pressed_on_ground = false;
- if (!NoBoost_OnWater)
- {
- DeleteObject_(auraobj);
- auraobj = nullptr;
- }
- DeleteObject_(trailobj);
- trailobj = nullptr;
- WriteData((float**)0x55E6FA, &SuperTornado);
- co1->Status &= ~Status_Ball;
- co1->Status &= ~Status_Attack;
- if (!is_hyper)
- {
- if (!is_super)
- {
- co2->PhysicsData.MaxAccel = 7.0;
- co2->PhysicsData.GroundAccel = 0.1;
- co2->PhysicsData.field_68 = -0.8550;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 11.25;
- co2->PhysicsData.GroundAccel = 0.15;
- co2->PhysicsData.field_68 = 0.0;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- }
- else
- {
- co2->PhysicsData.MaxAccel = 15;
- co2->PhysicsData.GroundAccel = 0.25;
- co2->PhysicsData.field_68 = 0.0;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- }
- if ((Z_was_pressed_in_air && !was_on_ground && (!(ControllerPointers[0]->HeldButtons & Buttons_Z) || co2->Speed.x < 8 || CharObj1Ptrs[0]->Action == 4 || CharObj1Ptrs[0]->Action == 6)))
- {
- WriteData((short*)0x00495C27, (short)12);
- Z_was_pressed_in_air = false;
- air_boost_used = true;
- if (!NoBoost_OnWater)
- {
- DeleteObject_(auraobj);
- auraobj = nullptr;
- }
- DeleteObject_(trailobj);
- trailobj = nullptr;
- WriteData((float**)0x55E6FA, &SuperTornado);
- co1->Status &= ~Status_Ball;
- co1->Status &= ~Status_Attack;
- if (!is_hyper)
- {
- if (!is_super)
- {
- co2->PhysicsData.MaxAccel = 7.0;
- co2->PhysicsData.GroundAccel = 0.1;
- co2->PhysicsData.field_68 = -0.8550;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 11.25;
- co2->PhysicsData.GroundAccel = 0.15;
- co2->PhysicsData.field_68 = 0.0;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- }
- else
- {
- co2->PhysicsData.MaxAccel = 15;
- co2->PhysicsData.GroundAccel = 0.25;
- co2->PhysicsData.field_68 = 0.0;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- }
- if ((Z_was_pressed_in_air && was_on_ground && (!(ControllerPointers[0]->HeldButtons & Buttons_Z) || co2->Speed.x < 6.5 || CharObj1Ptrs[0]->Action == 4 || CharObj1Ptrs[0]->Action == 6)))
- {
- WriteData((short*)0x00495C27, (short)12);
- if (!NoBoost_OnWater)
- {
- DeleteObject_(auraobj);
- auraobj = nullptr;
- }
- DeleteObject_(trailobj);
- trailobj = nullptr;
- Z_was_pressed_in_air = false;
- was_on_ground = false;
- WriteData((float**)0x55E6FA, &SuperTornado);
- co1->Status &= ~Status_Ball;
- co1->Status &= ~Status_Attack;
- if (!is_hyper)
- {
- if (!is_super)
- {
- co2->PhysicsData.MaxAccel = 7.0;
- co2->PhysicsData.GroundAccel = 0.1;
- co2->PhysicsData.field_68 = -0.8550;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 11.25;
- co2->PhysicsData.GroundAccel = 0.15;
- co2->PhysicsData.field_68 = 0.0;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- }
- else
- {
- co2->PhysicsData.MaxAccel = 15;
- co2->PhysicsData.GroundAccel = 0.25;
- co2->PhysicsData.field_68 = 0.0;
- co2->PhysicsData.GroundDecel = -0.06;
- }
- }
- }
- }
- }
- if (boostvoice > 0)
- {
- ++boostvoice;
- }
- if (boostvoice > 60)
- {
- boostvoice = 0;
- }
- }
- if (stomp_was_used)
- {
- WriteData((short*)0x00495C27, (short)12);
- if (!NoBoost_OnWater)
- {
- DeleteObject_(auraobj);
- auraobj = nullptr;
- }
- Z_was_pressed_in_air = false;
- was_on_ground = false;
- WriteData((float**)0x55E6FA, &SuperTornado);
- WriteData((void*)0x44FABF, always_attract_rings_unNOP);
- WriteData((float**)0x44FAFF, (float*)0x7DD574);
- WriteData((float*)0x44FBBA, 50.0f);
- WriteData((float**)0x44FBC4, (float*)0x7E05C4);
- WriteData((float**)0x44FBCE, (float*)0x7DCCFC);
- WriteData((float*)0x44FBDD, 5.0f);
- WriteData((float**)0x44FC2A, (float*)0x7DCC98);
- LightAttackTimer = 0;
- HangTimeLikeHeroes = 0;
- FOV = 70;
- SonicTrick3Timer1 = 0;
- SonicTrick3Timer2 = 0;
- homing_reattack_timer = 0;
- }
- if (GameState == 0 || GameState == 1 || GameState == 2 || GameState == 3 || GameState == 4 || GameState == 6 || GameState == 7 || CharObj1Ptrs[0]->Action == 15 || CharObj1Ptrs[0]->Action == 16 || CharObj1Ptrs[0]->Action == 86 || CharObj1Ptrs[0]->Action == 20 || CharObj1Ptrs[0]->Action == 50 || CharObj1Ptrs[0]->Action == 18 || CharObj1Ptrs[0]->Action == 21 || CharObj1Ptrs[0]->Action == 22 || CharObj1Ptrs[0]->Action == 23 || CharObj1Ptrs[0]->Action == 24 || CharObj1Ptrs[0]->Action == 25 || CharObj1Ptrs[0]->Action == 26 || CharObj1Ptrs[0]->Action == 27 || CharObj1Ptrs[0]->Action == 28 || CharObj1Ptrs[0]->Action == 29 || CharObj1Ptrs[0]->Action == 33 || CharObj1Ptrs[0]->Action == 34 || CharObj1Ptrs[0]->Action == 35 || CharObj1Ptrs[0]->Action == 36 || CharObj1Ptrs[0]->Action == 37 || CharObj1Ptrs[0]->Action == 38 || CharObj1Ptrs[0]->Action == 43 || CharObj1Ptrs[0]->Action == 45 || CharObj1Ptrs[0]->Action == 47 || CharObj1Ptrs[0]->Action == 55 || CharObj1Ptrs[0]->Action == 56 || CharObj1Ptrs[0]->Action == 57 || CharObj1Ptrs[0]->Action == 58 || CharObj1Ptrs[0]->Action == 59 || CharObj1Ptrs[0]->Action == 60 || CharObj1Ptrs[0]->Action == 61 || CharObj1Ptrs[0]->Action == 62 || CharObj1Ptrs[0]->Action == 65 || CharObj1Ptrs[0]->Action == 66 || CharObj1Ptrs[0]->Action == 67 || CharObj1Ptrs[0]->Action == 68 || CharObj1Ptrs[0]->Action == 69 || CharObj1Ptrs[0]->Action == 70 || CharObj1Ptrs[0]->Action == 72 || CharObj1Ptrs[0]->Action == 74 || CharObj1Ptrs[0]->Action == 83 || CharObj1Ptrs[0]->Action == 85 || CharObj1Ptrs[0]->Action == 87)
- {
- WriteData((short*)0x00495C27, (short)12);
- if (!NoBoost_OnWater)
- {
- DeleteObject_(auraobj);
- auraobj = nullptr;
- }
- DeleteObject_(trailobj);
- trailobj = nullptr;
- Z_was_pressed_in_air = false;
- was_on_ground = false;
- WriteData((float**)0x55E6FA, &SuperTornado);
- co1->Status &= ~Status_Ball;
- co1->Status &= ~Status_Attack;
- WriteData((void*)0x44FABF, always_attract_rings_unNOP);
- WriteData((float**)0x44FAFF, (float*)0x7DD574);
- WriteData((float*)0x44FBBA, 50.0f);
- WriteData((float**)0x44FBC4, (float*)0x7E05C4);
- WriteData((float**)0x44FBCE, (float*)0x7DCCFC);
- WriteData((float*)0x44FBDD, 5.0f);
- WriteData((float**)0x44FC2A, (float*)0x7DCC98);
- LightAttackTimer = 0;
- HangTimeLikeHeroes = 0;
- FOV = 70;
- SonicTrick3Timer1 = 0;
- SonicTrick3Timer2 = 0;
- stompvar = 0;
- stompvar2 = 0;
- bouncevar = 0;
- homing_reattack_timer = 0;
- boostvoice = 0;
- //if (SpeedShoesCount == 0)
- //{
- // if (!is_hyper)
- // {
- // if (!is_super)
- // {
- // co2->PhysicsData.MaxAccel = 3.5;
- // co2->PhysicsData.GroundAccel = 0.05;
- // co2->PhysicsData.field_68 = -0.4275;
- // co2->PhysicsData.GroundDecel = -0.06;
- // }
- // else
- // {
- // co2->PhysicsData.MaxAccel = 6.0;
- // co2->PhysicsData.GroundAccel = 0.075;
- // co2->PhysicsData.field_68 = 0.0;
- // co2->PhysicsData.GroundDecel = -0.06;
- // }
- // }
- // else
- // {
- // co2->PhysicsData.MaxAccel = 10.0;
- // co2->PhysicsData.GroundAccel = 0.125;
- // co2->PhysicsData.field_68 = 0.0;
- // co2->PhysicsData.GroundDecel = -0.06;
- // }
- //}
- //if (SpeedShoesCount > 0)
- //{
- // if (!is_hyper)
- // {
- // if (!is_super)
- // {
- // co2->PhysicsData.MaxAccel = 7.0;
- // co2->PhysicsData.GroundAccel = 0.1;
- // co2->PhysicsData.field_68 = -0.8550;
- // co2->PhysicsData.GroundDecel = -0.06;
- // }
- // else
- // {
- // co2->PhysicsData.MaxAccel = 12.0;
- // co2->PhysicsData.GroundAccel = 0.15;
- // co2->PhysicsData.field_68 = 0.0;
- // co2->PhysicsData.GroundDecel = -0.06;
- // }
- // }
- // else
- // {
- // co2->PhysicsData.MaxAccel = 20.0;
- // co2->PhysicsData.GroundAccel = 0.25;
- // co2->PhysicsData.field_68 = 0.0;
- // co2->PhysicsData.GroundDecel = -0.06;
- // }
- //}
- }
- }
- ////play sounds (voice and sfx)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement