Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Punching Action without Character Switch FINALLLLLLLLLLLLLLLLLLLLLLLLL
- word_3C53626 = 0; //3rd to 4th and 5th no longer automatic
- if (co2 == NULL) return; //you return the whole onframe function??
- if (co1CPU == NULL) return;
- if (GetCharacterObject(0) && GetCharacterID(0) == Characters_Sonic && MetalSonicFlag == 0)
- {
- if (GameState == 4)
- {
- co1P3->Position = co1->Position;
- WriteData((char*)Sonic_Display, (char)0x8B);
- WriteData((char*)Knuckles_Display, (char)0xC3);
- punching = false;
- punchattack = 0;
- has_punched_once = false;
- will_punch = 0;
- just_rolled = false;
- justrolled = 0;
- knuckles_teleport_to_sonic = false;
- knuckles_teleported_away = false;
- X_press = 0;
- can_X_press = 0;
- stru_3C532A0[54].NextAnim = 0;
- stru_3C532A0[55].NextAnim = 0;
- stru_3C532A0[56].NextAnim = 0;
- }
- if (GameState == 15)
- {
- if (!punching)
- {
- if (!oldcountSonic) oldcountSonic = co1->CollisionInfo[0].Count;
- oldcountSonic = 0;
- co1P3->Position = co1->Position;
- co1P3->Rotation = co1->Rotation;
- co2P3->Speed = co2->Speed;
- stru_3C532A0[54].NextAnim = 0;
- stru_3C532A0[55].NextAnim = 0;
- stru_3C532A0[56].NextAnim = 0;
- EntityData1Ptrs[2]->Action = 9;
- co2P3->AnimationThing.Index = 19;
- X_press = 0;
- can_X_press = 0;
- }
- else
- {
- if (!oldcountKnux) oldcountKnux = co1P3->CollisionInfo[0].Count;
- oldcountKnux = 0;
- ++can_X_press;
- if (ControllerPointers[0]->PressedButtons & Buttons_X && X_press == 1)
- {
- stru_3C532A0[55].NextAnim = 56;
- X_press = 2;
- }
- if (ControllerPointers[0]->PressedButtons & Buttons_X && X_press == 0/* && can_X_press >= 10*/)
- {
- stru_3C532A0[54].NextAnim = 55;
- X_press = 1;
- }
- co1->Position = co1P3->Position;
- co1P3->Rotation = co1->Rotation;
- co2->Speed = co2P3->Speed;
- EntityData1Ptrs[0]->Action = 1;
- co2->AnimationThing.Index = 2;
- }
- if (knuckles_teleport_to_sonic)
- {
- co1P3->Position.x = co1->Position.x;
- co1P3->Position.y = co1->Position.y;
- co1P3->Position.z = co1->Position.z;
- co1P3->Rotation.x = co1->Rotation.x;
- co1P3->Rotation.y = co1->Rotation.y;
- co1P3->Rotation.z = co1->Rotation.z;
- EntityData1Ptrs[2]->Action = 26;
- co2P3->AnimationThing.Index = 54;
- co2P3->Powerups |= Powerups_Invincibility;
- punching = true;
- knuckles_teleport_to_sonic = false;
- }
- if (justrolled == 1)
- {
- just_rolled = false;
- justrolled = 0;
- }
- if (EntityData1Ptrs[0]->Action == 5) just_rolled = true;
- if (EntityData1Ptrs[0]->Action == 8 || co2->Speed.x <= 0.46) just_rolled = false;
- if (just_rolled && ControllerPointers[0]->PressedButtons & Buttons_X) justrolled == 1;
- if (!punching && (EntityData1Ptrs[0]->Action == 0 || EntityData1Ptrs[0]->Action == 1 || EntityData1Ptrs[0]->Action == 2))
- {
- if (ControllerPointers[0]->HeldButtons & Buttons_X && (co1->Status & Status_LightDash) != Status_LightDash && !just_rolled)
- {
- ++punchattack;
- }
- if (!just_rolled && punchattack < 30 && ControllerPointers[0]->ReleasedButtons & Buttons_X)
- {
- co1P3->CollisionInfo[0].Count = oldcountKnux;
- WriteData((char*)Sonic_Display, (char)0xC3);
- WriteData((char*)Knuckles_Display, (char)0x83);
- knuckles_teleport_to_sonic = true;
- punchattack = 0;
- }
- }
- if (EntityData1Ptrs[2]->Action != 26 && !knuckles_teleport_to_sonic)
- {
- WriteData((char*)Sonic_Display, (char)0x8B);
- WriteData((char*)Knuckles_Display, (char)0xC3);
- co2P3->Powerups &= ~Powerups_Invincibility;
- punching = false;
- co1P3->Position.x = co1->Position.x;
- co1P3->Position.y = co1->Position.y;
- co1P3->Position.z = co1->Position.z;
- co2P3->Speed.x = 0;
- co2P3->Speed.y = 0;
- co2P3->Speed.z = 0;
- EntityData1Ptrs[2]->Action = 9;
- co2P3->AnimationThing.Index = 19;
- knuckles_teleported_away = true;
- co1->CollisionInfo[0].Count = oldcountSonic;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement