Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Punching Action without Character Switch
- if (co2 == NULL) return;
- if (co1CPU == NULL) return;
- if (GetCharacterObject(0) && GetCharacterID(0) == Characters_Sonic && MetalSonicFlag == 0)
- {
- if (GameState == 4)
- {
- co1P3->Position.x = co1->Position.x;
- co1P3->Position.y = co1->Position.y;
- co1P3->Position.z = co1->Position.z;
- WriteData((char*)Sonic_Display, (char)0x8B);
- WriteData((char*)Knuckles_Display, (char)0xC3);
- EntityData1Ptrs[0]->InvulnerableTime = 0;
- 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 (EntityData1Ptrs[0]->InvulnerableTime > 200) EntityData1Ptrs[0]->InvulnerableTime = 0;
- 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;
- co2P3->Speed.x = co2->Speed.x;
- co2P3->Speed.y = co2->Speed.y;
- co2P3->Speed.z = co2->Speed.z;
- stru_3C532A0[54].NextAnim = 0;
- stru_3C532A0[55].NextAnim = 0;
- stru_3C532A0[56].NextAnim = 0;
- EntityData1Ptrs[2]->Action = 9;
- co2P3->AnimationThing.Index = 19;
- //word_3C53606 = 0; //1st to 2nd no longer automatic
- //word_3C53616 = 0; //2nd to 3rd no longer automatic
- X_press = 0;
- can_X_press = 0;
- }
- else
- {
- if (EntityData1Ptrs[0]->InvulnerableTime >= 0 && EntityData1Ptrs[0]->InvulnerableTime < 5) EntityData1Ptrs[0]->InvulnerableTime = 32000;
- ++can_X_press;
- if (ControllerPointers[0]->PressedButtons & Buttons_X && X_press == 1)
- {
- //word_3C53616 = 56;
- stru_3C532A0[55].NextAnim = 56;
- //co2P3->AnimationThing.Index = 56;
- X_press = 2;
- }
- if (ControllerPointers[0]->PressedButtons & Buttons_X && X_press == 0/* && can_X_press >= 10*/)
- {
- stru_3C532A0[54].NextAnim = 55;
- //word_3C53606 = 55;
- //co2P3->AnimationThing.Index = 55;
- X_press = 1;
- }
- co1->Position.x = co1P3->Position.x;
- co1->Position.y = co1P3->Position.y;
- co1->Position.z = co1P3->Position.z;
- co1P3->Rotation.x = co1->Rotation.x;
- co1P3->Rotation.y = co1->Rotation.y;
- co1P3->Rotation.z = co1->Rotation.z;
- co2->Speed.x = co2P3->Speed.x;
- co2->Speed.y = co2P3->Speed.y;
- co2->Speed.z = co2P3->Speed.z;
- EntityData1Ptrs[0]->Action = 1;
- co2->AnimationThing.Index = 2;
- //co2->Upgrades |= Upgrades_SuperSonic;
- }
- 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)
- {
- WriteData((char*)Sonic_Display, (char)0xC3);
- WriteData((char*)Knuckles_Display, (char)0x83);
- if (EntityData1Ptrs[0]->InvulnerableTime >= 0 && EntityData1Ptrs[0]->InvulnerableTime < 5) EntityData1Ptrs[0]->InvulnerableTime = 32000;
- 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;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement