Advertisement
Benji23245

Untitled

Jun 13th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.30 KB | None | 0 0
  1. ObjectMaster *auraobj = nullptr;
  2. ObjectMaster *trailobj = nullptr;
  3.  
  4.  
  5. float SuperTornado = 16.0f;
  6. float Boost_SuperTornado = -100.0f;
  7.  
  8.  
  9. int SpeedShoesCount = 0;
  10.  
  11. ObjectFunc(sub_441D50, 0x441D50);
  12. void SetSpeedShoes(ObjectMaster *obj)
  13. {
  14. SpeedShoesCount++;
  15. sub_441D50(obj);
  16. }
  17.  
  18. ObjectFunc(sub_441D10, 0x441D10);
  19. void UnsetSpeedShoes(ObjectMaster *obj)
  20. {
  21. if (SpeedShoesCount > 0)
  22. SpeedShoesCount--;
  23. sub_441D10(obj);
  24. }
  25.  
  26.  
  27. __declspec(dllexport) void Init(const char *path, const HelperFunctions &helperFunctions)
  28. {
  29. WriteData((void(**)(ObjectMaster*))0x441E10, &SetSpeedShoes);
  30. WriteData((void(**)(ObjectMaster*))0x441DEA, &UnsetSpeedShoes);
  31. };
  32.  
  33.  
  34.  
  35. //Sonic Boost
  36. if (co2 == NULL) return;
  37. if (GetCharacterObject(0) && GetCharacterID(0) == Characters_Sonic && MetalSonicFlag == 0)
  38. {
  39. if (SpeedShoesCount == 0)
  40. {
  41. 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)
  42. {
  43. if (ControllerPointers[0]->HeldButtons & Buttons_Y)
  44. {
  45. WriteData((float**)0x55E6FA, &Boost_SuperTornado);
  46. if (!auraobj) auraobj = LoadObject(LoadObj_Data1, 2, Sonic_SuperAura_Load);
  47. if (!trailobj)
  48. {
  49. trailobj = LoadObject(LoadObj_Data1, 6, SonicDashTrail_Init);
  50. trailobj->Data1->CharIndex = 0;
  51. }
  52. if (co2->Speed.x <= 6)
  53. {
  54. co2->PhysicsData.MaxAccel = 7.0;
  55. co2->PhysicsData.GroundAccel = 0.30;
  56. co2->PhysicsData.field_68 = 0;
  57. }
  58. else
  59. {
  60. co2->PhysicsData.MaxAccel = 7.0;
  61. co2->PhysicsData.GroundAccel = 0.15;
  62. co2->PhysicsData.field_68 = 0;
  63. }
  64. }
  65. else
  66. {
  67. DeleteObject_(auraobj);
  68. DeleteObject_(trailobj);
  69. auraobj = nullptr;
  70. trailobj = nullptr;
  71. WriteData((float**)0x55E6FA, &SuperTornado);
  72. co2->PhysicsData.MaxAccel = 3.5;
  73. co2->PhysicsData.GroundAccel = 0.05;
  74. co2->PhysicsData.field_68 = -0.4275;
  75. }
  76. }
  77. }
  78. else
  79. {
  80. 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)
  81. {
  82. if (ControllerPointers[0]->HeldButtons & Buttons_Y)
  83. {
  84. WriteData((float**)0x55E6FA, &Boost_SuperTornado);
  85. if (!auraobj) auraobj = LoadObject(LoadObj_Data1, 2, Sonic_SuperAura_Load);
  86. if (!trailobj)
  87. {
  88. trailobj = LoadObject(LoadObj_Data1, 6, SonicDashTrail_Init);
  89. trailobj->Data1->CharIndex = 0;
  90. }
  91. if (co2->Speed.x <= 6)
  92. {
  93. co2->PhysicsData.MaxAccel = 14.0;
  94. co2->PhysicsData.GroundAccel = 0.60;
  95. co2->PhysicsData.field_68 = 0;
  96. }
  97. else
  98. {
  99. co2->PhysicsData.MaxAccel = 14.0;
  100. co2->PhysicsData.GroundAccel = 0.30;
  101. co2->PhysicsData.field_68 = 0;
  102. }
  103. }
  104. else
  105. {
  106. DeleteObject_(auraobj);
  107. DeleteObject_(trailobj);
  108. auraobj = nullptr;
  109. trailobj = nullptr;
  110. WriteData((float**)0x55E6FA, &SuperTornado);
  111. co2->PhysicsData.MaxAccel = 7.0;
  112. co2->PhysicsData.GroundAccel = 0.10;
  113. co2->PhysicsData.field_68 = -0.8550;
  114. }
  115. }
  116. }
  117. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement