Advertisement
Benji23245

Untitled

Jun 18th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. //Sonic Boost**********************STILL ON WORK IN PROGRESS !!!!!!!!!!!
  2. if (co2 == NULL) return;
  3. if (GetCharacterObject(0) && GetCharacterID(0) == Characters_Sonic && MetalSonicFlag == 0)
  4. {
  5. if (SpeedShoesCount == 0)
  6. {
  7. 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)
  8. {
  9. if (ControllerPointers[0]->PressedButtons & Buttons_Y)
  10. {
  11. Y_was_pressed = true;
  12. }
  13. if (ControllerPointers[0]->PressedButtons & Buttons_Y && co2->Speed.x <= 2.5)
  14. {
  15. co2->Speed.x = 2.5;
  16. }
  17. if (Y_was_pressed && ControllerPointers[0]->HeldButtons & Buttons_Y)
  18. {
  19. WriteData((float**)0x55E6FA, &Boost_SuperTornado);
  20. if (!auraobj) auraobj = LoadObject(LoadObj_Data1, 2, Sonic_SuperAura_Load);
  21. if (!trailobj)
  22. {
  23. trailobj = LoadObject(LoadObj_Data1, 6, SonicDashTrail_Init);
  24. trailobj->Data1->CharIndex = 0;
  25. }
  26. if (co2->Speed.x <= 6)
  27. {
  28. co2->PhysicsData.MaxAccel = 7.0;
  29. co2->PhysicsData.GroundAccel = 0.30;
  30. co2->PhysicsData.field_68 = 0;
  31. }
  32. else
  33. {
  34. co2->PhysicsData.MaxAccel = 7.0;
  35. co2->PhysicsData.GroundAccel = 0.15;
  36. co2->PhysicsData.field_68 = 0;
  37. }
  38. }
  39. if (ControllerPointers[0]->HeldButtons & !Buttons_Y || co2->Speed.x < 2.5 )
  40. {
  41. Y_was_pressed = false;
  42. DeleteObject_(auraobj);
  43. DeleteObject_(trailobj);
  44. auraobj = nullptr;
  45. trailobj = nullptr;
  46. WriteData((float**)0x55E6FA, &SuperTornado);
  47. co2->PhysicsData.MaxAccel = 3.5;
  48. co2->PhysicsData.GroundAccel = 0.05;
  49. co2->PhysicsData.field_68 = -0.4275;
  50. }
  51. }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement