Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Chaos Spear Action => have each chaos spear cost energy (only when not in CB_lv2/3)
- //*****Have Tails CPU always be replaced by Gamma CPU;
- //*****Have that same CPU always there, in any level or adventure field, whenever Sonic is played as, that CPU must be here too
- WriteData((short*)0x4C4E34, (short)30000);//Gamma infinite aiming laser timer
- //*****Disable all Gamma sounds;
- //*****Disable Gamma "5,4,3,2,1 sec left" textures;
- //*****Make Gamma laser invisible;
- //*****Make Gamma x1 / x2 etc all invisible;
- WriteData((char*)0x4CEA60, (char)0xC3);//removes the red/yellow squares
- WriteData((void*)0x42667F, 0x90, 5);//Stop the timer from going up when killing enemies as gamma
- //*****Disable Gamma's timebonuses (sounds, effects and textures);
- if (GetCharacterObject(0) && GetCharacterID(0) == Characters_Sonic && MetalSonicFlag == 0)
- {
- if (GameState == 4)
- {
- //*****load normal shadow model;
- go_back_to_gameplay = 0;
- ((AnimData_t*)0x3C56210)[18].AnimationSpeed = 1;
- CS_launch_was_played = false;
- CS_charging_was_played = false;
- CS_empty_was_played = false;
- is_in_CS_state = false;
- X_was_released = false;
- //*****Gamma Y position = 50000;
- WriteData((char*)0x4977AB, (char)0x74);//Allows homing attack
- //*****Remove controls on Gamma;
- EntityData1Ptrs[0]->InvulnerableTime = 0;
- WriteData((void*)0x497013, enable_SONIC_KNUXflashing);
- has_homing_attacked = false;
- //Gauge = 0;
- }
- if (GameState == 15)
- {
- int anims2[]{ 116, 117, 119 };
- //*****Make Gamma always invincible - flashing;
- //*****Gamma speed = 0;
- //*****Gamma action is falling;
- //*****Gamma animation is falling;
- if (EntityData1Ptrs[0]->Action == 14)
- {
- has_homing_attacked = true;
- }
- if ((co1->Status & Status_Ground) == Status_Ground || 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 || co2->AnimationThing.Index == 9 || co2->AnimationThing.Index == 10 || co2->AnimationThing.Index == 11 || co2->AnimationThing.Index == 12 || co2->AnimationThing.Index == 13 || co2->AnimationThing.Index == 14 || co2->AnimationThing.Index == 20 || co2->AnimationThing.Index == 25 || co2->AnimationThing.Index == 31 || co2->AnimationThing.Index == 71 || co2->AnimationThing.Index == 130 || co2->AnimationThing.Index == 131 || EntityData1Ptrs[0]->Action == 8 || EntityData1Ptrs[0]->Action == 6)
- {
- has_homing_attacked = false;
- }
- if ((co2->AnimationThing.Index == 14 || co2->AnimationThing.Index == 18 || co2->AnimationThing.Index == 116 || co2->AnimationThing.Index == 117 || co2->AnimationThing.Index == 119) && (EntityData1Ptrs[0]->Action != 4 && EntityData1Ptrs[0]->Action != 5 && EntityData1Ptrs[0]->Action != 14 && EntityData1Ptrs[0]->Action != 44) && !is_in_CS_state && !has_homing_attacked && (co1->Status & Status_LightDash) != Status_LightDash)
- {
- if (/*Gauge > 0 && */ControllerPointers[0]->HeldButtons & Buttons_X)
- {
- ((AnimData_t*)0x3C56210)[18].AnimationSpeed = 0;
- EntityData1Ptrs[0]->Action = 12;
- co2->AnimationThing.Index = 18;
- is_in_CS_state = true;
- }
- }
- if (is_in_CS_state)
- {
- //*****Gamma position is into Sonic;
- //*****Gamma rotation is Sonic's;
- WriteData((char*)0x4977AB, (char)0xEB);//disables homing attack
- co1->Position.x = old_X_position;
- co1->Position.y = old_Y_position;
- co1->Position.z = old_Z_position;
- co2->Speed.x = 0.0;
- co2->Speed.y = 0.0;
- co2->Speed.z = 0.0;
- WriteData((void*)0x43CC72, 0x90, 6); //Allow gravity change for P1
- co2->PhysicsData.Gravity = 0.0;
- //*****Remove gravity for Gamma CPU;
- //*****Allow controls on Gamma;
- if (EntityData1Ptrs[0]->InvulnerableTime == 0)
- {
- EntityData1Ptrs[0]->InvulnerableTime = 60000;
- WriteData((void*)0x497013, 0x90, 4);//disable sonic flashing when "invulnerable time"
- }
- if (!CS_charging_was_played)
- {
- PlayVoice(1323);
- CS_charging_was_played = true;
- }
- if (!(ControllerPointers[0]->HeldButtons & Buttons_X))
- {
- X_was_released = true;
- }
- if (X_was_released)
- {
- //DO ALLLLLLLL THE SYSTEM I ORIGINALLY DID FOR MULTIPLE TARGETS AND NUMBER OF TARGETS HE SHOOTS AT LIMITATION
- if (!CS_empty_was_played)
- {
- PlayVoice(1321);
- CS_empty_was_played = true;
- }
- //*****if (Gamma shoot address = 4 /*or 5?*/ && !CS_launch_was_played) => is it the same as I used in my first Chaos Spear attempt ?
- //*****{
- PlaySound(775, 0, 0, 0);
- CS_launch_was_played = true;
- //Gauge -= 500; // but how to make it do it for each shoot ??
- //***** }
- else go_back_to_gameplay = 30;
- if (CS_launch_was_played)
- {
- ++go_back_to_gameplay;
- //do the model animation;
- }
- if (go_back_to_gameplay == 30)
- {
- //load normal shadow model;
- go_back_to_gameplay = 0;
- ((AnimData_t*)0x3C56210)[18].AnimationSpeed = 1;
- CS_charging_was_played = false;
- CS_launch_was_played = false;
- CS_empty_was_played = false;
- is_in_CS_state = false;
- X_was_released = false;
- if (has_homing_attacked)
- {
- EntityData1Ptrs[0]->Action = 12;
- co2->AnimationThing.Index = 18;
- }
- else
- {
- EntityData1Ptrs[0]->Action = 8;
- co2->AnimationThing.Index = anims2[rand() % 3];
- }
- }
- }
- }
- else
- {
- //*****Gamma Y position = 50000;// => P2 CPU's X/Y/Z position are P1's +1A0/1A4/1A8
- WriteData((void*)0x43CC72, gravity_orig_hovering);
- if (co2->_struct_a3.ColFlagsA & ColFlags_Water)
- {
- co2->PhysicsData.Gravity = 0.032;
- }
- else co2->PhysicsData.Gravity = 0.08;
- EntityData1Ptrs[0]->InvulnerableTime = 0;
- WriteData((void*)0x497013, enable_SONIC_KNUXflashing);
- //*****Remove Controls on Gamma;
- WriteData((char*)0x4977AB, (char)0x74);//Allows Homing Attack
- old_X_position = co1->Position.x;
- old_Y_position = co1->Position.y;
- old_Z_position = co1->Position.z;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement