Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ObjectMaster *auraobj = nullptr;
- ObjectMaster *trailobj = nullptr;
- float SuperTornado = 16.0f;
- float Boost_SuperTornado = -100.0f;
- int SpeedShoesCount = 0;
- ObjectFunc(sub_441D50, 0x441D50);
- void SetSpeedShoes(ObjectMaster *obj)
- {
- SpeedShoesCount++;
- sub_441D50(obj);
- }
- ObjectFunc(sub_441D10, 0x441D10);
- void UnsetSpeedShoes(ObjectMaster *obj)
- {
- if (SpeedShoesCount > 0)
- SpeedShoesCount--;
- sub_441D10(obj);
- }
- __declspec(dllexport) void Init(const char *path, const HelperFunctions &helperFunctions)
- {
- WriteData((void(**)(ObjectMaster*))0x441E10, &SetSpeedShoes);
- WriteData((void(**)(ObjectMaster*))0x441DEA, &UnsetSpeedShoes);
- };
- //Sonic Boost
- if (co2 == NULL) return;
- if (GetCharacterObject(0) && GetCharacterID(0) == Characters_Sonic && MetalSonicFlag == 0)
- {
- if (SpeedShoesCount == 0)
- {
- 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]->HeldButtons & Buttons_Y)
- {
- WriteData((float**)0x55E6FA, &Boost_SuperTornado);
- if (!auraobj) auraobj = LoadObject(LoadObj_Data1, 2, Sonic_SuperAura_Load);
- if (!trailobj)
- {
- trailobj = LoadObject(LoadObj_Data1, 6, SonicDashTrail_Init);
- trailobj->Data1->CharIndex = 0;
- }
- if (co2->Speed.x <= 6)
- {
- co2->PhysicsData.MaxAccel = 7.0;
- co2->PhysicsData.GroundAccel = 0.30;
- co2->PhysicsData.field_68 = 0;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 7.0;
- co2->PhysicsData.GroundAccel = 0.15;
- co2->PhysicsData.field_68 = 0;
- }
- }
- else
- {
- DeleteObject_(auraobj);
- DeleteObject_(trailobj);
- auraobj = nullptr;
- trailobj = nullptr;
- WriteData((float**)0x55E6FA, &SuperTornado);
- co2->PhysicsData.MaxAccel = 3.5;
- co2->PhysicsData.GroundAccel = 0.05;
- co2->PhysicsData.field_68 = -0.4275;
- }
- }
- }
- else
- {
- 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]->HeldButtons & Buttons_Y)
- {
- WriteData((float**)0x55E6FA, &Boost_SuperTornado);
- if (!auraobj) auraobj = LoadObject(LoadObj_Data1, 2, Sonic_SuperAura_Load);
- if (!trailobj)
- {
- trailobj = LoadObject(LoadObj_Data1, 6, SonicDashTrail_Init);
- trailobj->Data1->CharIndex = 0;
- }
- if (co2->Speed.x <= 6)
- {
- co2->PhysicsData.MaxAccel = 14.0;
- co2->PhysicsData.GroundAccel = 0.60;
- co2->PhysicsData.field_68 = 0;
- }
- else
- {
- co2->PhysicsData.MaxAccel = 14.0;
- co2->PhysicsData.GroundAccel = 0.30;
- co2->PhysicsData.field_68 = 0;
- }
- }
- else
- {
- DeleteObject_(auraobj);
- DeleteObject_(trailobj);
- auraobj = nullptr;
- trailobj = nullptr;
- WriteData((float**)0x55E6FA, &SuperTornado);
- co2->PhysicsData.MaxAccel = 7.0;
- co2->PhysicsData.GroundAccel = 0.10;
- co2->PhysicsData.field_68 = -0.8550;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement