Advertisement
Benji23245

Untitled

Oct 21st, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 55.81 KB | None | 0 0
  1. //Sonic/Super/Hyper Boost (FINAL)*************************************************************if speed == 8.0 still to do !!!!!!!!
  2.  
  3. if (co2 == NULL) return;
  4. if (GetCharacterObject(0) && GetCharacterID(0) == Characters_Sonic && MetalSonicFlag == 0)
  5. {
  6. if (GameState == 15)
  7. {
  8. if (co2->gap5C[0] & 2)
  9. {
  10. WriteJump((void*)0x55E7A8, (void*)0x55E7C0);
  11. WriteJump((void*)0x55EEBF, (void*)0x55EEDA);
  12. //if (!auraobj)
  13. //{
  14. // WriteJump((void*)0x55E6F5, (void*)0x55E78A);
  15. // auraobj = LoadObject(LoadObj_Data1, 2, Sonic_SuperAura_Load);
  16. // NoBoost_OnWater = true;
  17. //}
  18. }
  19. else// if ((!(co2->gap5C[0] & 2)) || (co2->gap5C[0] & 2 && (co2->Speed.x <= 7.5 || CharObj1Ptrs[0]->Action == 8)))
  20. {
  21. WriteData((void*)0x55E7A8, SuperSplashData);
  22. WriteData((void*)0x55EEBF, SuperSplashScale);
  23. //WriteData((void*)0x55E6F5, SuperSplashAura);
  24. //NoBoost_OnWater = false;
  25. }
  26. if (!auraobj)
  27. {
  28. if (SpeedShoesCount == 0)
  29. {
  30. if (!is_hyper)
  31. {
  32. if (!is_super)
  33. {
  34. co2->PhysicsData.MaxAccel = 3.5;
  35. co2->PhysicsData.GroundAccel = 0.05;
  36. co2->PhysicsData.field_68 = -0.4275;
  37. co2->PhysicsData.GroundDecel = -0.06;
  38. }
  39. else
  40. {
  41. co2->PhysicsData.MaxAccel = 7.25;
  42. co2->PhysicsData.GroundAccel = 0.075;
  43. co2->PhysicsData.field_68 = 0.0;
  44. co2->PhysicsData.GroundDecel = -0.06;
  45. }
  46. }
  47. else
  48. {
  49. co2->PhysicsData.MaxAccel = 10.5;
  50. co2->PhysicsData.GroundAccel = 0.125;
  51. co2->PhysicsData.field_68 = 0.0;
  52. co2->PhysicsData.GroundDecel = -0.06;
  53. }
  54. }
  55. if (SpeedShoesCount > 0)
  56. {
  57. if (!is_hyper)
  58. {
  59. if (!is_super)
  60. {
  61. co2->PhysicsData.MaxAccel = 7.0;
  62. co2->PhysicsData.GroundAccel = 0.1;
  63. co2->PhysicsData.field_68 = -0.8550;
  64. co2->PhysicsData.GroundDecel = -0.06;
  65. }
  66. else
  67. {
  68. co2->PhysicsData.MaxAccel = 11.25;
  69. co2->PhysicsData.GroundAccel = 0.15;
  70. co2->PhysicsData.field_68 = 0.0;
  71. co2->PhysicsData.GroundDecel = -0.06;
  72. }
  73. }
  74. else
  75. {
  76. co2->PhysicsData.MaxAccel = 15;
  77. co2->PhysicsData.GroundAccel = 0.25;
  78. co2->PhysicsData.field_68 = 0.0;
  79. co2->PhysicsData.GroundDecel = -0.06;
  80. }
  81. }
  82. //if (!is_hyper)
  83. //{
  84. // if (!is_super)
  85. // {
  86. // if (co2->PhysicsData.MaxAccel == 8.0)
  87. // {
  88. // co2->PhysicsData.MaxAccel = 3.5;
  89. // co2->PhysicsData.GroundAccel = 0.05;
  90. // co2->PhysicsData.field_68 = -0.4275;
  91. // co2->PhysicsData.GroundDecel = -0.06;
  92. // }
  93. // }
  94. // else if (co2->PhysicsData.MaxAccel == 11.5)
  95. // {
  96. // co2->PhysicsData.MaxAccel = 6.0;
  97. // co2->PhysicsData.GroundAccel = 0.075;
  98. // co2->PhysicsData.field_68 = 0.0;
  99. // co2->PhysicsData.GroundDecel = -0.06;
  100. // }
  101. //}
  102. //else if (co2->PhysicsData.MaxAccel == 8.0)
  103. //{
  104. // co2->PhysicsData.MaxAccel = 10.0;
  105. // co2->PhysicsData.GroundAccel = 0.125;
  106. // co2->PhysicsData.field_68 = 0.0;
  107. // co2->PhysicsData.GroundDecel = -0.06;
  108. //}
  109. }
  110. WriteData((void*)0x55E95C, 0x90, 6);//nop the supersonic flag forever
  111. //if (auraobj && !NoBoost_OnWater)
  112. if (auraobj && CharObj1Ptrs[0]->Action != 6)
  113. {
  114. trailobj = LoadObject(LoadObj_Data1, 6, SonicDashTrail_Init);
  115. trailobj->Data1->CharIndex = 0;
  116. co2->PhysicsData.AirDecel = -0.015;
  117. WriteData((char*)0x496EF6, (char)0xEB);
  118. }
  119. else
  120. {
  121. WriteData((char*)0x496EF6, (char)0x74);
  122. }
  123. if (*(float**)0x55E6FA == &Boost_SuperTornado)
  124. {
  125. if (FOV < 120)
  126. {
  127. FOV += 5;
  128. }
  129. co1->Status |= Status_Ball;
  130. co1->Status |= Status_Attack;
  131. WriteData((void*)0x496EF8, 0x90, 3);
  132. WriteData((void*)0x494AF9, 0x90, 5);
  133. WriteData((void*)0x44FABF, 0x90, 6);//always ring attraction
  134. WriteData((float**)0x44FAFF, &ringdist);//attract rings from further
  135. WriteData((float*)0x44FBBA, ringdist);//attract rings from further 2
  136. WriteData((float**)0x44FBCE, &ringmaxspeed);
  137. WriteData((float*)0x44FBDD, ringmaxspeed);
  138. WriteData((float**)0x44FBC4, &ringaccel);
  139. WriteData((float**)0x44FC2A, &ringspeedmultiplier);
  140. if (co2->UnderwaterTime == 0)
  141. {
  142. WriteData((void*)0x4496E1, 0x90, 6);
  143. }
  144. else if (co2->Speed.x <= 7.5 || CharObj1Ptrs[0]->Action == 8)
  145. {
  146. WriteData((void*)0x4496E1, WalkOnWaterData);
  147. }
  148. }
  149. else
  150. {
  151. if (FOV > 70)
  152. {
  153. FOV -= 5;
  154. }
  155. if (co2->Speed.x <= 7.5 || CharObj1Ptrs[0]->Action == 8)
  156. {
  157. WriteData((void*)0x4496E1, WalkOnWaterData);
  158. }
  159. WriteData((void*)0x496EF8, SpindashData);
  160. WriteData((void*)0x44FABF, always_attract_rings_unNOP);
  161. WriteData((float**)0x44FAFF, (float*)0x7DD574);
  162. WriteData((float*)0x44FBBA, 50.0f);
  163. WriteData((float**)0x44FBC4, (float*)0x7E05C4);
  164. WriteData((float**)0x44FBCE, (float*)0x7DCCFC);
  165. WriteData((float*)0x44FBDD, 5.0f);
  166. WriteData((float**)0x44FC2A, (float*)0x7DCC98);
  167. }
  168. njSetPerspective(NJM_DEG_ANG(FOV));
  169. if (SpeedShoesCount == 0)
  170. {
  171. if ((co1->Status & Status_Ground) == Status_Ground)
  172. {
  173. was_on_ground = true;
  174. air_boost_used = false;
  175. 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)
  176. {
  177. if (ControllerPointers[0]->PressedButtons & Buttons_Z)
  178. {
  179. Z_was_pressed_on_ground = true;
  180. //PlaySound(766, 0, 0, 0);
  181. PlayVoice(1316);
  182. if (boostvoice == 0)
  183. {
  184. PlaySound(BoostVoices[rand() % 3], 0, 0, 0);
  185. boostvoice = 1;
  186. }
  187. 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)
  188. {
  189. CharObj1Ptrs[0]->Action = 2;
  190. }
  191. }
  192. 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)
  193. {
  194. if (!is_hyper)
  195. {
  196. if (!is_super)
  197. {
  198. if (co2->Speed.x <= 9.0)
  199. {
  200. co2->Speed.x = 9.0;
  201. }
  202. }
  203. else if (co2->Speed.x <= 12.0)
  204. {
  205. co2->Speed.x = 12.0;
  206. }
  207. }
  208. else
  209. {
  210. if (co2->Speed.x <= 14.5)
  211. {
  212. co2->Speed.x = 14.5;
  213. }
  214. }
  215. }
  216. 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)
  217. {
  218. WriteData((float**)0x55E6FA, &Boost_SuperTornado);
  219. if (!auraobj) auraobj = LoadObject(LoadObj_Data1, 2, Sonic_SuperAura_Load);
  220. if (co2->Speed.x >= 8)
  221. {
  222. WriteData((short*)0x00495C27, (short)13);
  223. }
  224. else WriteData((short*)0x00495C27, (short)12);
  225. if (!is_hyper)
  226. {
  227. if (!is_super)
  228. {
  229. if (co2->Speed.x <= 6)
  230. {
  231. co2->PhysicsData.MaxAccel = 8.0;
  232. co2->PhysicsData.GroundAccel = 0.225;
  233. co2->PhysicsData.field_68 = 0;
  234. co2->PhysicsData.GroundDecel = 0.096;
  235. }
  236. else
  237. {
  238. co2->PhysicsData.MaxAccel = 8.0;
  239. co2->PhysicsData.GroundAccel = 0.15;
  240. co2->PhysicsData.field_68 = 0;
  241. co2->PhysicsData.GroundDecel = 0.096;
  242. }
  243. }
  244. else
  245. {
  246. if (co2->Speed.x <= 9)
  247. {
  248. co2->PhysicsData.MaxAccel = 12.0;
  249. co2->PhysicsData.GroundAccel = 0.4;
  250. co2->PhysicsData.field_68 = 0;
  251. co2->PhysicsData.GroundDecel = 0.096;
  252. }
  253. else
  254. {
  255. co2->PhysicsData.MaxAccel = 12.0;
  256. co2->PhysicsData.GroundAccel = 0.2;
  257. co2->PhysicsData.field_68 = 0;
  258. co2->PhysicsData.GroundDecel = 0.096;
  259. }
  260. }
  261. }
  262. else
  263. {
  264. if (co2->Speed.x <= 12)
  265. {
  266. co2->PhysicsData.MaxAccel = 17.0;
  267. co2->PhysicsData.GroundAccel = 0.5;
  268. co2->PhysicsData.field_68 = 0;
  269. co2->PhysicsData.GroundDecel = 0.096;
  270. }
  271. else
  272. {
  273. co2->PhysicsData.MaxAccel = 17.0;
  274. co2->PhysicsData.GroundAccel = 0.25;
  275. co2->PhysicsData.field_68 = 0;
  276. co2->PhysicsData.GroundDecel = 0.096;
  277. }
  278. }
  279. }
  280. if (Z_was_pressed_on_ground)
  281. {
  282. if (!(ControllerPointers[0]->HeldButtons & Buttons_Z) || co2->Speed.x < 3 || CharObj1Ptrs[0]->Action == 4 || CharObj1Ptrs[0]->Action == 6)
  283. {
  284. WriteData((short*)0x00495C27, (short)12);
  285. Z_was_pressed_on_ground = false;
  286. Z_was_pressed_in_air = false;
  287. if (!NoBoost_OnWater)
  288. {
  289. DeleteObject_(auraobj);
  290. auraobj = nullptr;
  291. }
  292. DeleteObject_(trailobj);
  293. trailobj = nullptr;
  294. WriteData((float**)0x55E6FA, &SuperTornado);
  295. co1->Status &= ~Status_Ball;
  296. co1->Status &= ~Status_Attack;
  297. if (!is_hyper)
  298. {
  299. if (!is_super)
  300. {
  301. co2->PhysicsData.MaxAccel = 3.5;
  302. co2->PhysicsData.GroundAccel = 0.05;
  303. co2->PhysicsData.field_68 = -0.4275;
  304. co2->PhysicsData.GroundDecel = -0.06;
  305. }
  306. else
  307. {
  308. co2->PhysicsData.MaxAccel = 7.25;
  309. co2->PhysicsData.GroundAccel = 0.075;
  310. co2->PhysicsData.field_68 = 0.0;
  311. co2->PhysicsData.GroundDecel = -0.06;
  312. }
  313. }
  314. else
  315. {
  316. co2->PhysicsData.MaxAccel = 10.5;
  317. co2->PhysicsData.GroundAccel = 0.125;
  318. co2->PhysicsData.field_68 = 0.0;
  319. co2->PhysicsData.GroundDecel = -0.06;
  320. }
  321. }
  322. }
  323. if (Z_was_pressed_in_air)
  324. {
  325. if (!(ControllerPointers[0]->HeldButtons & Buttons_Z) || co2->Speed.x < 3 || CharObj1Ptrs[0]->Action == 4 || CharObj1Ptrs[0]->Action == 6)
  326. {
  327. WriteData((short*)0x00495C27, (short)12);
  328. Z_was_pressed_in_air = false;
  329. was_on_ground = false;
  330. if (!NoBoost_OnWater)
  331. {
  332. DeleteObject_(auraobj);
  333. auraobj = nullptr;
  334. }
  335. DeleteObject_(trailobj);
  336. trailobj = nullptr;
  337. WriteData((float**)0x55E6FA, &SuperTornado);
  338. co1->Status &= ~Status_Ball;
  339. co1->Status &= ~Status_Attack;
  340. if (!is_hyper)
  341. {
  342. if (!is_super)
  343. {
  344. co2->PhysicsData.MaxAccel = 3.5;
  345. co2->PhysicsData.GroundAccel = 0.05;
  346. co2->PhysicsData.field_68 = -0.4275;
  347. co2->PhysicsData.GroundDecel = -0.06;
  348. }
  349. else
  350. {
  351. co2->PhysicsData.MaxAccel = 7.25;
  352. co2->PhysicsData.GroundAccel = 0.075;
  353. co2->PhysicsData.field_68 = 0.0;
  354. co2->PhysicsData.GroundDecel = -0.06;
  355. }
  356. }
  357. else
  358. {
  359. co2->PhysicsData.MaxAccel = 10.5;
  360. co2->PhysicsData.GroundAccel = 0.125;
  361. co2->PhysicsData.field_68 = 0.0;
  362. co2->PhysicsData.GroundDecel = -0.06;
  363. }
  364. }
  365. }
  366. }
  367. }
  368. 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))
  369. {
  370. 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)
  371. {
  372. if (ControllerPointers[0]->PressedButtons & Buttons_Z)
  373. {
  374. if (!air_boost_used)
  375. {
  376. PlayVoice(1316);
  377. if (boostvoice == 0)
  378. {
  379. PlaySound(BoostVoices[rand() % 3], 0, 0, 0);
  380. boostvoice = 1;
  381. }
  382. }
  383. Z_was_pressed_in_air = true;
  384. was_on_ground = false;
  385. }
  386. 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)
  387. {
  388. CharObj1Ptrs[0]->Action = 12;
  389. }
  390. 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)
  391. {
  392. co2->AnimationThing.Index = 64;
  393. }
  394. 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)
  395. {
  396. if (!is_hyper)
  397. {
  398. if (!is_super)
  399. {
  400. if (co2->Speed.x <= 10.0)
  401. {
  402. co2->Speed.x = 10.0;
  403. }
  404. }
  405. else if (co2->Speed.x <= 12.5)
  406. {
  407. co2->Speed.x = 12.5;
  408. }
  409. }
  410. else
  411. {
  412. if (co2->Speed.x <= 15.0)
  413. {
  414. co2->Speed.x = 15.0;
  415. }
  416. }
  417. }
  418. 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)
  419. {
  420. WriteData((float**)0x55E6FA, &Boost_SuperTornado);
  421. if (!auraobj) auraobj = LoadObject(LoadObj_Data1, 2, Sonic_SuperAura_Load);
  422. WriteData((short*)0x00495C27, (short)13);
  423. if (!is_hyper)
  424. {
  425. if (!is_super)
  426. {
  427. if (co2->Speed.x <= 6)
  428. {
  429. co2->PhysicsData.MaxAccel = 8.0;
  430. co2->PhysicsData.GroundAccel = 0.225;
  431. co2->PhysicsData.field_68 = 0;
  432. co2->PhysicsData.GroundDecel = 0.096;
  433. }
  434. else
  435. {
  436. co2->PhysicsData.MaxAccel = 8.0;
  437. co2->PhysicsData.GroundAccel = 0.15;
  438. co2->PhysicsData.field_68 = 0;
  439. co2->PhysicsData.GroundDecel = 0.096;
  440. }
  441. }
  442. else
  443. {
  444. if (co2->Speed.x <= 9)
  445. {
  446. co2->PhysicsData.MaxAccel = 12.0;
  447. co2->PhysicsData.GroundAccel = 0.4;
  448. co2->PhysicsData.field_68 = 0;
  449. co2->PhysicsData.GroundDecel = 0.096;
  450. }
  451. else
  452. {
  453. co2->PhysicsData.MaxAccel = 12.0;
  454. co2->PhysicsData.GroundAccel = 0.2;
  455. co2->PhysicsData.field_68 = 0;
  456. co2->PhysicsData.GroundDecel = 0.096;
  457. }
  458. }
  459. }
  460. else
  461. {
  462. if (co2->Speed.x <= 12)
  463. {
  464. co2->PhysicsData.MaxAccel = 17.0;
  465. co2->PhysicsData.GroundAccel = 0.5;
  466. co2->PhysicsData.field_68 = 0;
  467. co2->PhysicsData.GroundDecel = 0.096;
  468. }
  469. else
  470. {
  471. co2->PhysicsData.MaxAccel = 17.0;
  472. co2->PhysicsData.GroundAccel = 0.25;
  473. co2->PhysicsData.field_68 = 0;
  474. co2->PhysicsData.GroundDecel = 0.096;
  475. }
  476. }
  477. }
  478. 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)))
  479. {
  480. WriteData((short*)0x00495C27, (short)12);
  481. Z_was_pressed_on_ground = false;
  482. if (!NoBoost_OnWater)
  483. {
  484. DeleteObject_(auraobj);
  485. auraobj = nullptr;
  486. }
  487. DeleteObject_(trailobj);
  488. trailobj = nullptr;
  489. WriteData((float**)0x55E6FA, &SuperTornado);
  490. co1->Status &= ~Status_Ball;
  491. co1->Status &= ~Status_Attack;
  492. if (!is_hyper)
  493. {
  494. if (!is_super)
  495. {
  496. co2->PhysicsData.MaxAccel = 3.5;
  497. co2->PhysicsData.GroundAccel = 0.05;
  498. co2->PhysicsData.field_68 = -0.4275;
  499. co2->PhysicsData.GroundDecel = -0.06;
  500. }
  501. else
  502. {
  503. co2->PhysicsData.MaxAccel = 7.25;
  504. co2->PhysicsData.GroundAccel = 0.075;
  505. co2->PhysicsData.field_68 = 0.0;
  506. co2->PhysicsData.GroundDecel = -0.06;
  507. }
  508. }
  509. else
  510. {
  511. co2->PhysicsData.MaxAccel = 10.5;
  512. co2->PhysicsData.GroundAccel = 0.125;
  513. co2->PhysicsData.field_68 = 0.0;
  514. co2->PhysicsData.GroundDecel = -0.06;
  515. }
  516. }
  517. 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)))
  518. {
  519. WriteData((short*)0x00495C27, (short)12);
  520. Z_was_pressed_in_air = false;
  521. air_boost_used = true;
  522. if (!NoBoost_OnWater)
  523. {
  524. DeleteObject_(auraobj);
  525. auraobj = nullptr;
  526. }
  527. DeleteObject_(trailobj);
  528. trailobj = nullptr;
  529. WriteData((float**)0x55E6FA, &SuperTornado);
  530. co1->Status &= ~Status_Ball;
  531. co1->Status &= ~Status_Attack;
  532. if (!is_hyper)
  533. {
  534. if (!is_super)
  535. {
  536. co2->PhysicsData.MaxAccel = 3.5;
  537. co2->PhysicsData.GroundAccel = 0.05;
  538. co2->PhysicsData.field_68 = -0.4275;
  539. co2->PhysicsData.GroundDecel = -0.06;
  540. }
  541. else
  542. {
  543. co2->PhysicsData.MaxAccel = 7.25;
  544. co2->PhysicsData.GroundAccel = 0.075;
  545. co2->PhysicsData.field_68 = 0.0;
  546. co2->PhysicsData.GroundDecel = -0.06;
  547. }
  548. }
  549. else
  550. {
  551. co2->PhysicsData.MaxAccel = 10.5;
  552. co2->PhysicsData.GroundAccel = 0.125;
  553. co2->PhysicsData.field_68 = 0.0;
  554. co2->PhysicsData.GroundDecel = -0.06;
  555. }
  556. }
  557. 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)))
  558. {
  559. WriteData((short*)0x00495C27, (short)12);
  560. if (!NoBoost_OnWater)
  561. {
  562. DeleteObject_(auraobj);
  563. auraobj = nullptr;
  564. }
  565. DeleteObject_(trailobj);
  566. trailobj = nullptr;
  567. Z_was_pressed_in_air = false;
  568. was_on_ground = false;
  569. WriteData((float**)0x55E6FA, &SuperTornado);
  570. co1->Status &= ~Status_Ball;
  571. co1->Status &= ~Status_Attack;
  572. if (!is_hyper)
  573. {
  574. if (!is_super)
  575. {
  576. co2->PhysicsData.MaxAccel = 3.5;
  577. co2->PhysicsData.GroundAccel = 0.05;
  578. co2->PhysicsData.field_68 = -0.4275;
  579. co2->PhysicsData.GroundDecel = -0.06;
  580. }
  581. else
  582. {
  583. co2->PhysicsData.MaxAccel = 7.25;
  584. co2->PhysicsData.GroundAccel = 0.075;
  585. co2->PhysicsData.field_68 = 0.0;
  586. co2->PhysicsData.GroundDecel = -0.06;
  587. }
  588. }
  589. else
  590. {
  591. co2->PhysicsData.MaxAccel = 10.5;
  592. co2->PhysicsData.GroundAccel = 0.125;
  593. co2->PhysicsData.field_68 = 0.0;
  594. co2->PhysicsData.GroundDecel = -0.06;
  595. }
  596. }
  597. }
  598. }
  599. }
  600. if (SpeedShoesCount > 0)
  601. {
  602. if ((co1->Status & Status_Ground) == Status_Ground)
  603. {
  604. was_on_ground = true;
  605. air_boost_used = false;
  606. 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)
  607. {
  608. 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)
  609. {
  610. Z_was_pressed_on_ground = true;
  611. //PlaySound(766, 0, 0, 0);
  612. PlayVoice(1316);
  613. if (boostvoice == 0)
  614. {
  615. PlaySound(BoostVoices[rand() % 3], 0, 0, 0);
  616. boostvoice = 1;
  617. }
  618. 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)
  619. {
  620. CharObj1Ptrs[0]->Action = 2;
  621. }
  622. }
  623. 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)
  624. {
  625. if (!is_hyper)
  626. {
  627. if (!is_super)
  628. {
  629. if (co2->Speed.x <= 12.5)
  630. {
  631. co2->Speed.x = 12.5;
  632. }
  633. }
  634. else if (co2->Speed.x <= 16)
  635. {
  636. co2->Speed.x = 16;
  637. }
  638. }
  639. else
  640. {
  641. if (co2->Speed.x <= 21)
  642. {
  643. co2->Speed.x = 21;
  644. }
  645. }
  646. }
  647. 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)
  648. {
  649. WriteData((float**)0x55E6FA, &Boost_SuperTornado);
  650. if (!auraobj) auraobj = LoadObject(LoadObj_Data1, 2, Sonic_SuperAura_Load);
  651. if (co2->Speed.x >= 8)
  652. {
  653. WriteData((short*)0x00495C27, (short)13);
  654. }
  655. else WriteData((short*)0x00495C27, (short)12);
  656. if (!is_hyper)
  657. {
  658. if (!is_super)
  659. {
  660. if (co2->Speed.x <= 6)
  661. {
  662. co2->PhysicsData.MaxAccel = 12.0;
  663. co2->PhysicsData.GroundAccel = 0.45;
  664. co2->PhysicsData.field_68 = 0;
  665. co2->PhysicsData.GroundDecel = 0.096;
  666. }
  667. else
  668. {
  669. co2->PhysicsData.MaxAccel = 12.0;
  670. co2->PhysicsData.GroundAccel = 0.225;
  671. co2->PhysicsData.field_68 = 0;
  672. co2->PhysicsData.GroundDecel = 0.096;
  673. }
  674. }
  675. else
  676. {
  677. if (co2->Speed.x <= 9)
  678. {
  679. co2->PhysicsData.MaxAccel = 18.5;
  680. co2->PhysicsData.GroundAccel = 0.6;
  681. co2->PhysicsData.field_68 = 0;
  682. co2->PhysicsData.GroundDecel = 0.096;
  683. }
  684. else
  685. {
  686. co2->PhysicsData.MaxAccel = 18.5;
  687. co2->PhysicsData.GroundAccel = 0.3;
  688. co2->PhysicsData.field_68 = 0;
  689. co2->PhysicsData.GroundDecel = 0.096;
  690. }
  691. }
  692. }
  693. else
  694. {
  695. if (co2->Speed.x <= 12)
  696. {
  697. co2->PhysicsData.MaxAccel = 25.5;
  698. co2->PhysicsData.GroundAccel = 0.75;
  699. co2->PhysicsData.field_68 = 0;
  700. co2->PhysicsData.GroundDecel = 0.096;
  701. }
  702. else
  703. {
  704. co2->PhysicsData.MaxAccel = 25.5;
  705. co2->PhysicsData.GroundAccel = 0.375;
  706. co2->PhysicsData.field_68 = 0;
  707. co2->PhysicsData.GroundDecel = 0.096;
  708. }
  709. }
  710. }
  711. if (Z_was_pressed_on_ground)
  712. {
  713. if (!(ControllerPointers[0]->HeldButtons & Buttons_Z) || co2->Speed.x < 3 || CharObj1Ptrs[0]->Action == 4 || CharObj1Ptrs[0]->Action == 6)
  714. {
  715. WriteData((short*)0x00495C27, (short)12);
  716. Z_was_pressed_on_ground = false;
  717. Z_was_pressed_in_air = false;
  718. if (!NoBoost_OnWater)
  719. {
  720. DeleteObject_(auraobj);
  721. auraobj = nullptr;
  722. }
  723. DeleteObject_(trailobj);
  724. trailobj = nullptr;
  725. WriteData((float**)0x55E6FA, &SuperTornado);
  726. co1->Status &= ~Status_Ball;
  727. co1->Status &= ~Status_Attack;
  728. if (!is_hyper)
  729. {
  730. if (!is_super)
  731. {
  732. co2->PhysicsData.MaxAccel = 7.0;
  733. co2->PhysicsData.GroundAccel = 0.1;
  734. co2->PhysicsData.field_68 = -0.8550;
  735. co2->PhysicsData.GroundDecel = -0.06;
  736. }
  737. else
  738. {
  739. co2->PhysicsData.MaxAccel = 11.25;
  740. co2->PhysicsData.GroundAccel = 0.15;
  741. co2->PhysicsData.field_68 = 0.0;
  742. co2->PhysicsData.GroundDecel = -0.06;
  743. }
  744. }
  745. else
  746. {
  747. co2->PhysicsData.MaxAccel = 15;
  748. co2->PhysicsData.GroundAccel = 0.25;
  749. co2->PhysicsData.field_68 = 0.0;
  750. co2->PhysicsData.GroundDecel = -0.06;
  751. }
  752. }
  753. }
  754. if (Z_was_pressed_in_air)
  755. {
  756. if (!(ControllerPointers[0]->HeldButtons & Buttons_Z) || co2->Speed.x < 3 || CharObj1Ptrs[0]->Action == 4 || CharObj1Ptrs[0]->Action == 6)
  757. {
  758. WriteData((short*)0x00495C27, (short)12);
  759. Z_was_pressed_in_air = false;
  760. was_on_ground = false;
  761. if (!NoBoost_OnWater)
  762. {
  763. DeleteObject_(auraobj);
  764. auraobj = nullptr;
  765. }
  766. DeleteObject_(trailobj);
  767. trailobj = nullptr;
  768. WriteData((float**)0x55E6FA, &SuperTornado);
  769. co1->Status &= ~Status_Ball;
  770. co1->Status &= ~Status_Attack;
  771. if (!is_hyper)
  772. {
  773. if (!is_super)
  774. {
  775. co2->PhysicsData.MaxAccel = 7.0;
  776. co2->PhysicsData.GroundAccel = 0.1;
  777. co2->PhysicsData.field_68 = -0.8550;
  778. co2->PhysicsData.GroundDecel = -0.06;
  779. }
  780. else
  781. {
  782. co2->PhysicsData.MaxAccel = 11.25;
  783. co2->PhysicsData.GroundAccel = 0.15;
  784. co2->PhysicsData.field_68 = 0.0;
  785. co2->PhysicsData.GroundDecel = -0.06;
  786. }
  787. }
  788. else
  789. {
  790. co2->PhysicsData.MaxAccel = 15;
  791. co2->PhysicsData.GroundAccel = 0.25;
  792. co2->PhysicsData.field_68 = 0.0;
  793. co2->PhysicsData.GroundDecel = -0.06;
  794. }
  795. }
  796. }
  797. }
  798. }
  799. 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))
  800. {
  801. if (CharObj1Ptrs[0]->Action != 6 && CharObj1Ptrs[0]->Action != 14 && CharObj1Ptrs[0]->Action != 23 && CharObj1Ptrs[0]->Action != 44)
  802. {
  803. 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)
  804. {
  805. if (!air_boost_used)
  806. {
  807. PlayVoice(1316);
  808. if (boostvoice == 0)
  809. {
  810. PlaySound(BoostVoices[rand() % 3], 0, 0, 0);
  811. boostvoice = 1;
  812. }
  813. }
  814. Z_was_pressed_in_air = true;
  815. was_on_ground = false;
  816. }
  817. 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)
  818. {
  819. CharObj1Ptrs[0]->Action = 12;
  820. }
  821. 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)
  822. {
  823. co2->AnimationThing.Index = 64;
  824. }
  825. 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)
  826. {
  827. if (!is_hyper)
  828. {
  829. if (!is_super)
  830. {
  831. if (co2->Speed.x <= 13.0)
  832. {
  833. co2->Speed.x = 13.0;
  834. }
  835. }
  836. else if (co2->Speed.x <= 16.5)
  837. {
  838. co2->Speed.x = 16.5;
  839. }
  840. }
  841. else
  842. {
  843. if (co2->Speed.x <= 21.5)
  844. {
  845. co2->Speed.x = 21.5;
  846. }
  847. }
  848. }
  849. 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)
  850. {
  851. WriteData((float**)0x55E6FA, &Boost_SuperTornado);
  852. if (!auraobj) auraobj = LoadObject(LoadObj_Data1, 2, Sonic_SuperAura_Load);
  853. WriteData((short*)0x00495C27, (short)13);
  854. if (!is_hyper)
  855. {
  856. if (!is_super)
  857. {
  858. if (co2->Speed.x <= 6)
  859. {
  860. co2->PhysicsData.MaxAccel = 12.0;
  861. co2->PhysicsData.GroundAccel = 0.45;
  862. co2->PhysicsData.field_68 = 0;
  863. co2->PhysicsData.GroundDecel = 0.096;
  864. }
  865. else
  866. {
  867. co2->PhysicsData.MaxAccel = 12.0;
  868. co2->PhysicsData.GroundAccel = 0.225;
  869. co2->PhysicsData.field_68 = 0;
  870. co2->PhysicsData.GroundDecel = 0.096;
  871. }
  872. }
  873. else
  874. {
  875. if (co2->Speed.x <= 9)
  876. {
  877. co2->PhysicsData.MaxAccel = 18.5;
  878. co2->PhysicsData.GroundAccel = 0.6;
  879. co2->PhysicsData.field_68 = 0;
  880. co2->PhysicsData.GroundDecel = 0.096;
  881. }
  882. else
  883. {
  884. co2->PhysicsData.MaxAccel = 18.5;
  885. co2->PhysicsData.GroundAccel = 0.3;
  886. co2->PhysicsData.field_68 = 0;
  887. co2->PhysicsData.GroundDecel = 0.096;
  888. }
  889. }
  890. }
  891. else
  892. {
  893. if (co2->Speed.x <= 12)
  894. {
  895. co2->PhysicsData.MaxAccel = 25.5;
  896. co2->PhysicsData.GroundAccel = 0.75;
  897. co2->PhysicsData.field_68 = 0;
  898. co2->PhysicsData.GroundDecel = 0.096;
  899. }
  900. else
  901. {
  902. co2->PhysicsData.MaxAccel = 25.5;
  903. co2->PhysicsData.GroundAccel = 0.375;
  904. co2->PhysicsData.field_68 = 0;
  905. co2->PhysicsData.GroundDecel = 0.096;
  906. }
  907. }
  908. }
  909. 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)))
  910. {
  911. WriteData((short*)0x00495C27, (short)12);
  912. Z_was_pressed_on_ground = false;
  913. if (!NoBoost_OnWater)
  914. {
  915. DeleteObject_(auraobj);
  916. auraobj = nullptr;
  917. }
  918. DeleteObject_(trailobj);
  919. trailobj = nullptr;
  920. WriteData((float**)0x55E6FA, &SuperTornado);
  921. co1->Status &= ~Status_Ball;
  922. co1->Status &= ~Status_Attack;
  923. if (!is_hyper)
  924. {
  925. if (!is_super)
  926. {
  927. co2->PhysicsData.MaxAccel = 7.0;
  928. co2->PhysicsData.GroundAccel = 0.1;
  929. co2->PhysicsData.field_68 = -0.8550;
  930. co2->PhysicsData.GroundDecel = -0.06;
  931. }
  932. else
  933. {
  934. co2->PhysicsData.MaxAccel = 11.25;
  935. co2->PhysicsData.GroundAccel = 0.15;
  936. co2->PhysicsData.field_68 = 0.0;
  937. co2->PhysicsData.GroundDecel = -0.06;
  938. }
  939. }
  940. else
  941. {
  942. co2->PhysicsData.MaxAccel = 15;
  943. co2->PhysicsData.GroundAccel = 0.25;
  944. co2->PhysicsData.field_68 = 0.0;
  945. co2->PhysicsData.GroundDecel = -0.06;
  946. }
  947. }
  948. 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)))
  949. {
  950. WriteData((short*)0x00495C27, (short)12);
  951. Z_was_pressed_in_air = false;
  952. air_boost_used = true;
  953. if (!NoBoost_OnWater)
  954. {
  955. DeleteObject_(auraobj);
  956. auraobj = nullptr;
  957. }
  958. DeleteObject_(trailobj);
  959. trailobj = nullptr;
  960. WriteData((float**)0x55E6FA, &SuperTornado);
  961. co1->Status &= ~Status_Ball;
  962. co1->Status &= ~Status_Attack;
  963. if (!is_hyper)
  964. {
  965. if (!is_super)
  966. {
  967. co2->PhysicsData.MaxAccel = 7.0;
  968. co2->PhysicsData.GroundAccel = 0.1;
  969. co2->PhysicsData.field_68 = -0.8550;
  970. co2->PhysicsData.GroundDecel = -0.06;
  971. }
  972. else
  973. {
  974. co2->PhysicsData.MaxAccel = 11.25;
  975. co2->PhysicsData.GroundAccel = 0.15;
  976. co2->PhysicsData.field_68 = 0.0;
  977. co2->PhysicsData.GroundDecel = -0.06;
  978. }
  979. }
  980. else
  981. {
  982. co2->PhysicsData.MaxAccel = 15;
  983. co2->PhysicsData.GroundAccel = 0.25;
  984. co2->PhysicsData.field_68 = 0.0;
  985. co2->PhysicsData.GroundDecel = -0.06;
  986. }
  987. }
  988. 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)))
  989. {
  990. WriteData((short*)0x00495C27, (short)12);
  991. if (!NoBoost_OnWater)
  992. {
  993. DeleteObject_(auraobj);
  994. auraobj = nullptr;
  995. }
  996. DeleteObject_(trailobj);
  997. trailobj = nullptr;
  998. Z_was_pressed_in_air = false;
  999. was_on_ground = false;
  1000. WriteData((float**)0x55E6FA, &SuperTornado);
  1001. co1->Status &= ~Status_Ball;
  1002. co1->Status &= ~Status_Attack;
  1003. if (!is_hyper)
  1004. {
  1005. if (!is_super)
  1006. {
  1007. co2->PhysicsData.MaxAccel = 7.0;
  1008. co2->PhysicsData.GroundAccel = 0.1;
  1009. co2->PhysicsData.field_68 = -0.8550;
  1010. co2->PhysicsData.GroundDecel = -0.06;
  1011. }
  1012. else
  1013. {
  1014. co2->PhysicsData.MaxAccel = 11.25;
  1015. co2->PhysicsData.GroundAccel = 0.15;
  1016. co2->PhysicsData.field_68 = 0.0;
  1017. co2->PhysicsData.GroundDecel = -0.06;
  1018. }
  1019. }
  1020. else
  1021. {
  1022. co2->PhysicsData.MaxAccel = 15;
  1023. co2->PhysicsData.GroundAccel = 0.25;
  1024. co2->PhysicsData.field_68 = 0.0;
  1025. co2->PhysicsData.GroundDecel = -0.06;
  1026. }
  1027. }
  1028. }
  1029. }
  1030. }
  1031. if (boostvoice > 0)
  1032. {
  1033. ++boostvoice;
  1034. }
  1035. if (boostvoice > 60)
  1036. {
  1037. boostvoice = 0;
  1038. }
  1039. }
  1040. if (stomp_was_used)
  1041. {
  1042. WriteData((short*)0x00495C27, (short)12);
  1043. if (!NoBoost_OnWater)
  1044. {
  1045. DeleteObject_(auraobj);
  1046. auraobj = nullptr;
  1047. }
  1048. Z_was_pressed_in_air = false;
  1049. was_on_ground = false;
  1050. WriteData((float**)0x55E6FA, &SuperTornado);
  1051. WriteData((void*)0x44FABF, always_attract_rings_unNOP);
  1052. WriteData((float**)0x44FAFF, (float*)0x7DD574);
  1053. WriteData((float*)0x44FBBA, 50.0f);
  1054. WriteData((float**)0x44FBC4, (float*)0x7E05C4);
  1055. WriteData((float**)0x44FBCE, (float*)0x7DCCFC);
  1056. WriteData((float*)0x44FBDD, 5.0f);
  1057. WriteData((float**)0x44FC2A, (float*)0x7DCC98);
  1058. LightAttackTimer = 0;
  1059. HangTimeLikeHeroes = 0;
  1060. FOV = 70;
  1061. SonicTrick3Timer1 = 0;
  1062. SonicTrick3Timer2 = 0;
  1063. homing_reattack_timer = 0;
  1064. }
  1065. 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)
  1066. {
  1067. WriteData((short*)0x00495C27, (short)12);
  1068. if (!NoBoost_OnWater)
  1069. {
  1070. DeleteObject_(auraobj);
  1071. auraobj = nullptr;
  1072. }
  1073. DeleteObject_(trailobj);
  1074. trailobj = nullptr;
  1075. Z_was_pressed_in_air = false;
  1076. was_on_ground = false;
  1077. WriteData((float**)0x55E6FA, &SuperTornado);
  1078. co1->Status &= ~Status_Ball;
  1079. co1->Status &= ~Status_Attack;
  1080. WriteData((void*)0x44FABF, always_attract_rings_unNOP);
  1081. WriteData((float**)0x44FAFF, (float*)0x7DD574);
  1082. WriteData((float*)0x44FBBA, 50.0f);
  1083. WriteData((float**)0x44FBC4, (float*)0x7E05C4);
  1084. WriteData((float**)0x44FBCE, (float*)0x7DCCFC);
  1085. WriteData((float*)0x44FBDD, 5.0f);
  1086. WriteData((float**)0x44FC2A, (float*)0x7DCC98);
  1087. LightAttackTimer = 0;
  1088. HangTimeLikeHeroes = 0;
  1089. FOV = 70;
  1090. SonicTrick3Timer1 = 0;
  1091. SonicTrick3Timer2 = 0;
  1092. stompvar = 0;
  1093. stompvar2 = 0;
  1094. bouncevar = 0;
  1095. homing_reattack_timer = 0;
  1096. boostvoice = 0;
  1097. //if (SpeedShoesCount == 0)
  1098. //{
  1099. // if (!is_hyper)
  1100. // {
  1101. // if (!is_super)
  1102. // {
  1103. // co2->PhysicsData.MaxAccel = 3.5;
  1104. // co2->PhysicsData.GroundAccel = 0.05;
  1105. // co2->PhysicsData.field_68 = -0.4275;
  1106. // co2->PhysicsData.GroundDecel = -0.06;
  1107. // }
  1108. // else
  1109. // {
  1110. // co2->PhysicsData.MaxAccel = 6.0;
  1111. // co2->PhysicsData.GroundAccel = 0.075;
  1112. // co2->PhysicsData.field_68 = 0.0;
  1113. // co2->PhysicsData.GroundDecel = -0.06;
  1114. // }
  1115. // }
  1116. // else
  1117. // {
  1118. // co2->PhysicsData.MaxAccel = 10.0;
  1119. // co2->PhysicsData.GroundAccel = 0.125;
  1120. // co2->PhysicsData.field_68 = 0.0;
  1121. // co2->PhysicsData.GroundDecel = -0.06;
  1122. // }
  1123. //}
  1124. //if (SpeedShoesCount > 0)
  1125. //{
  1126. // if (!is_hyper)
  1127. // {
  1128. // if (!is_super)
  1129. // {
  1130. // co2->PhysicsData.MaxAccel = 7.0;
  1131. // co2->PhysicsData.GroundAccel = 0.1;
  1132. // co2->PhysicsData.field_68 = -0.8550;
  1133. // co2->PhysicsData.GroundDecel = -0.06;
  1134. // }
  1135. // else
  1136. // {
  1137. // co2->PhysicsData.MaxAccel = 12.0;
  1138. // co2->PhysicsData.GroundAccel = 0.15;
  1139. // co2->PhysicsData.field_68 = 0.0;
  1140. // co2->PhysicsData.GroundDecel = -0.06;
  1141. // }
  1142. // }
  1143. // else
  1144. // {
  1145. // co2->PhysicsData.MaxAccel = 20.0;
  1146. // co2->PhysicsData.GroundAccel = 0.25;
  1147. // co2->PhysicsData.field_68 = 0.0;
  1148. // co2->PhysicsData.GroundDecel = -0.06;
  1149. // }
  1150. //}
  1151. }
  1152. }
  1153. ////play sounds (voice and sfx)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement