Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Chaos Blast Action // SUPERSONIC FLAG CAUSES SUPERSONIC TRANSFORMATIONS..........................................??????????????????????
- WriteData((char*)0x4C09F9, (char)0xEB);
- if (GetCharacterObject(0) && GetCharacterID(0) == Characters_Sonic && MetalSonicFlag == 0)
- {
- if (GameState == 4)
- {
- using_chaos_blast = false;
- chaos_blast_active_timer = 0;
- chaos_blast_radius_timer = 0;
- ((AnimData_t*)0x3C56210)[84].AnimationSpeed = 0.25;
- CHAOSBLAST_was_played = false;
- WriteData((void*)0x43CC72, gravity_orig_hovering);
- co2->PhysicsData.Gravity = 0.08;
- BombRadius = -1.0;
- OldBombRadius = 0.0;
- co2->Upgrades &= ~Upgrades_SuperSonic;
- cbBLUEsize = 0.0;
- cbREDsize = 0.0;
- }
- if (GameState == 15)
- {
- if (CB_lv3)
- {
- //if (EntityData1Ptrs[0]->Action != 16 && EntityData1Ptrs[0]->Action != 86 && EntityData1Ptrs[0]->Action != 44 && co2->AnimationThing.Index != 33 && co2->AnimationThing.Index != 34 && co2->AnimationThing.Index != 35 && co2->AnimationThing.Index != 36 && co2->AnimationThing.Index != 37 && co2->AnimationThing.Index != 38 && co2->AnimationThing.Index != 47 && co2->AnimationThing.Index != 48 && co2->AnimationThing.Index != 49 && co2->AnimationThing.Index != 50 && co2->AnimationThing.Index != 51 && co2->AnimationThing.Index != 52 && co2->AnimationThing.Index != 53 && co2->AnimationThing.Index != 54 && co2->AnimationThing.Index != 55 && co2->AnimationThing.Index != 56 && co2->AnimationThing.Index != 57 && co2->AnimationThing.Index != 58 && co2->AnimationThing.Index != 59 && co2->AnimationThing.Index != 60 && co2->AnimationThing.Index != 61 && co2->AnimationThing.Index != 62 && co2->AnimationThing.Index != 63 && co2->AnimationThing.Index != 65 && co2->AnimationThing.Index != 66 && co2->AnimationThing.Index != 67 && co2->AnimationThing.Index != 68 && co2->AnimationThing.Index != 69 && co2->AnimationThing.Index != 70 && co2->AnimationThing.Index != 71 && co2->AnimationThing.Index != 72 && co2->AnimationThing.Index != 73 && co2->AnimationThing.Index != 74 && co2->AnimationThing.Index != 75 && co2->AnimationThing.Index != 76 && co2->AnimationThing.Index != 77 && co2->AnimationThing.Index != 78 && co2->AnimationThing.Index != 79 && co2->AnimationThing.Index != 80 && co2->AnimationThing.Index != 81 && co2->AnimationThing.Index != 82 && co2->AnimationThing.Index != 89 && co2->AnimationThing.Index != 90 && co2->AnimationThing.Index != 91 && co2->AnimationThing.Index != 92 && co2->AnimationThing.Index != 93 && co2->AnimationThing.Index != 94 && co2->AnimationThing.Index != 95 && co2->AnimationThing.Index != 96 && co2->AnimationThing.Index != 97 && co2->AnimationThing.Index != 98 && co2->AnimationThing.Index != 99 && co2->AnimationThing.Index != 100 && co2->AnimationThing.Index != 101)
- if (EntityData1Ptrs[0]->Action == 0 || EntityData1Ptrs[0]->Action == 1 || EntityData1Ptrs[0]->Action == 2 || EntityData1Ptrs[0]->Action == 8 || EntityData1Ptrs[0]->Action == 12)
- {
- if (ControllerPointers[0]->PressedButtons & Buttons_Z && !using_chaos_blast)
- {
- if (EntityData1Ptrs[0]->Action == 0 || EntityData1Ptrs[0]->Action == 1 || EntityData1Ptrs[0]->Action == 2) co1->Position.y += 1.0;
- co2->Upgrades |= Upgrades_SuperSonic;
- using_chaos_blast = true;
- co2->field_A = 210;//to disable controls for 3.5 secs
- co2->Speed.x = 0;
- co2->Speed.y = 0;
- co2->Speed.z = 0;
- WriteData<6>((void*)0x43CC72, 0x90); //Allow gravity change for P1
- co2->PhysicsData.Gravity = 0.0;
- EntityData1Ptrs[0]->Action = 12;
- co2->AnimationThing.Index = 85;
- co1->Status &= ~Status_Ball;
- co1->Status &= ~Status_Attack;
- BombRadius = 0.0;
- OldBombRadius = 0.0;
- ((AnimData_t*)0x3C56210)[84].AnimationSpeed = 1.5;
- }
- }
- if (using_chaos_blast)
- {
- BombRadius = 0.0;
- ++chaos_blast_active_timer;
- if (chaos_blast_active_timer > 35)
- {
- cbBLUEsize += 0.01;
- njSetTexture((NJS_TEXLIST*)0x91CB58);
- njPushMatrix(nullptr);
- njTranslateV(nullptr, &co1->CollisionInfo->CollisionArray->origin);
- njScale(nullptr, cbBLUEsize, cbBLUEsize, cbBLUEsize);
- ProcessModelNode_B(&object_cbBLUE_0061B4DC, 1);
- njPopMatrix(0);
- }
- if (chaos_blast_active_timer < 90)
- {
- co2->Speed.y = 0.06;
- co2->AnimationThing.Index = 85; //tweak the anim speed to make it look good
- if (!CHAOSBLAST_was_played)
- {
- PlayVoice(1326);
- CHAOSBLAST_was_played = true;
- }
- }
- else if (chaos_blast_active_timer >= 90 && chaos_blast_active_timer < 210)
- {
- if (chaos_blast_active_timer <= 170)
- {
- cbREDsize += 0.333333;
- }
- njSetTexture((NJS_TEXLIST*)0x91CB58);
- njPushMatrix(nullptr);
- njTranslateV(nullptr, &co1->CollisionInfo->CollisionArray->origin);
- njScale(nullptr, cbREDsize, cbREDsize, cbREDsize);
- ProcessModelNode_B(&object_cbRED_0061AA94, 1);
- njPopMatrix(1);
- co2->Speed.y = 0.0;
- if (anim84speed < 7)
- {
- ((AnimData_t*)0x3C56210)[84].AnimationSpeed = 1.5;
- }
- else if (anim84speed / 4 % 2 == 0)
- {
- ((AnimData_t*)0x3C56210)[84].AnimationSpeed = -0.1;
- }
- else
- {
- ((AnimData_t*)0x3C56210)[84].AnimationSpeed = 0.1;
- }
- ++anim84speed;
- co2->AnimationThing.Index = 84; //tweak the anim speed to make it look good
- BombPosition = co1->Position;
- if (chaos_blast_radius_timer < 60)
- {
- ++chaos_blast_radius_timer;
- OldBombRadius += 3.33333;
- BombRadius = OldBombRadius;
- }
- //*****spawn explosion model;
- }
- else if (chaos_blast_active_timer >= 210)
- {
- co2->Upgrades &= ~Upgrades_SuperSonic;
- using_chaos_blast = false;
- cbBLUEsize = 0.0;
- cbREDsize = 0.0;
- chaos_blast_active_timer = 0;
- chaos_blast_radius_timer = 0;
- ((AnimData_t*)0x3C56210)[84].AnimationSpeed = 0.25;
- anim84speed = 0;
- CHAOSBLAST_was_played = false;
- 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]->Action = 8;
- co2->AnimationThing.Index = 18;
- }
- }
- else
- {
- OldBombRadius = 0.0;
- BombRadius = -1.0;
- }
- }
- else
- {
- OldBombRadius = 0.0;
- BombRadius = -1.0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement